We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b89a351 commit 067cfe2Copy full SHA for 067cfe2
1 file changed
public/js/render.js
@@ -45,7 +45,7 @@ var filterXSSOptions = {
45
// allow comment tag
46
if (tag === '!--') {
47
// do not filter its attributes
48
- return html
+ return html.replace(/<(?!!--)/g, '<').replace(/-->/g, '__HTML_COMMENT_END__').replace(/>/g, '>').replace(/__HTML_COMMENT_END__/g, '-->')
49
}
50
},
51
onTagAttr: function (tag, name, value, isWhiteAttr) {
0 commit comments