diff --git a/umap/static/umap/js/modules/rendering/template.js b/umap/static/umap/js/modules/rendering/template.js index 80f0be0b..39854c6e 100644 --- a/umap/static/umap/js/modules/rendering/template.js +++ b/umap/static/umap/js/modules/rendering/template.js @@ -271,7 +271,7 @@ class Wikipedia extends PopupTemplate { const extract = page.extract || '' const thumbnail = page.thumbnail?.source const [content, { image }] = Utils.loadTemplateWithRefs( - `

${title}

${extract}
` + `

${Utils.escapeHTML(title)}

${Utils.escapeHTML(extract)}
` ) if (thumbnail) { image.src = thumbnail diff --git a/umap/static/umap/js/modules/utils.js b/umap/static/umap/js/modules/utils.js index 19085ec3..2f70edf4 100644 --- a/umap/static/umap/js/modules/utils.js +++ b/umap/static/umap/js/modules/utils.js @@ -115,6 +115,8 @@ export function escapeHTML(s) { 'span', 'dt', 'dd', + 'b', + 'i', ], ADD_ATTR: [ 'target',