Skip to content

Commit

Permalink
Fixed escaping of links in popups
Browse files Browse the repository at this point in the history
  • Loading branch information
tstibbs committed Feb 13, 2025
1 parent dfea266 commit 02b7ca6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/js/popup_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default {
_buildValue: function (value) {
if (typeof value === 'object' && 'url' in value) {
let {url, text, type} = value
url = encodeURI(url)
url = this._escapeValue(url)
text = this._truncateDisplayString(this._escapeValue(text))
if (type != null && type.startsWith('image/')) {
return `
Expand All @@ -43,7 +43,7 @@ export default {
} else if (Array.isArray(value) && value.length == 2) {
//legacy array-based method
let text = this._truncateDisplayString(this._escapeValue(value[0]))
let url = value[1]
let url = this._escapeValue(value[1])
return `<a href="${url}">${text}</a>`
} else {
return this._truncateDisplayString(this._escapeValue(value))
Expand Down

0 comments on commit 02b7ca6

Please sign in to comment.