1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

escaped location with escapeHtml()

This commit is contained in:
Felix Oswald 2022-03-19 09:50:40 +01:00
parent 55ad352d08
commit 2521b06142
No known key found for this signature in database
GPG key ID: EE45798131E279DE

View file

@ -666,12 +666,12 @@ function reloadFromItem(instance, page, params, item, user) {
if (item.Type == 'Person' && item.ProductionLocations && item.ProductionLocations.length) {
let location = item.ProductionLocations[0];
if (!layoutManager.tv && appHost.supports('externallinks')) {
itemBirthLocation.innerHTML = globalize.translate('BirthPlaceValue', `<a is="emby-linkbutton" class="button-link textlink" target="_blank" href="https://www.openstreetmap.org/search?query=${encodeURIComponent(location)}"></a>`);
page.querySelector('#itemBirthLocation > a').innerText = `${location}`;
location = `<a is="emby-linkbutton" class="button-link textlink" target="_blank" href="https://www.openstreetmap.org/search?query=${encodeURIComponent(location)}">${escapeHtml(location)}</a>`;
} else {
itemBirthLocation.innerText = globalize.translate('BirthPlaceValue', `${location}`);
location = escapeHtml(location);
}
itemBirthLocation.classList.remove('hide');
itemBirthLocation.innerHTML = globalize.translate('BirthPlaceValue', location);
} else {
itemBirthLocation.classList.add('hide');
}