fix: improper neutralization of user input in image wrapping code

(Backport of: 1d1639d46f)
isekai-main
Julian Lam 2 years ago
parent dd5ed9e507
commit 9ec7ab4afc

@ -24,7 +24,7 @@ define('forum/topic/images', [], function () {
if (!$this.parent().is('a')) {
$this.wrap('<a href="' + src + '" ' +
(!srcExt && altExt ? ' download="' + altFilename + '" ' : '') +
(!srcExt && altExt ? ' download="' + utils.escapeHTML(altFilename) + '" ' : '') +
' target="_blank" rel="noopener">');
}
});

Loading…
Cancel
Save