mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 18:37:30 +02:00
fix: improper neutralization of user input in image wrapping code
(Backport of: 1d1639d46f)
This commit is contained in:
@@ -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">');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user