fix: do not append HTML element as title in GeoRSSLink popup

This commit is contained in:
Yohan Boniface 2024-08-15 10:17:43 +02:00
parent 5a33709cc9
commit bc34851def

View file

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