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

Merge pull request #3503 from felixoswald/master

Fix birth location link
This commit is contained in:
Bill Thornton 2022-03-21 10:27:16 -04:00 committed by GitHub
commit 0f680a0862
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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