Merge pull request #2060 from umap-project/georss-link-title

fix: do not append HTML element as title in GeoRSSLink popup
This commit is contained in:
Yohan Boniface 2024-08-15 10:25:21 +02:00 committed by GitHub
commit b0c37671a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -137,13 +137,14 @@ class GeoRSSImage extends TitleMixin(PopupTemplate) {
} }
} }
class GeoRSSLink extends TitleMixin(PopupTemplate) { class GeoRSSLink extends PopupTemplate {
renderBody(feature, container) { renderBody(feature, container) {
const title = this.renderTitle(feature, container) if (feature.properties.link) {
return Utils.loadTemplate( return Utils.loadTemplate(
`<a href="${feature.properties.link}" target="_blank">${title}</a>` `<a href="${feature.properties.link}" target="_blank"><h3>${feature.getDisplayName()}</h3></a>`
) )
} }
}
} }
class OSM extends TitleMixin(PopupTemplate) { class OSM extends TitleMixin(PopupTemplate) {