summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/render.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/public/js/render.js b/public/js/render.js
index 9c1fa273..5c2b017a 100644
--- a/public/js/render.js
+++ b/public/js/render.js
@@ -3,6 +3,10 @@ var whiteListAttr = ['id', 'class', 'style'];
var filterXSSOptions = {
allowCommentTag: true,
+ escapeHtml: function (html) {
+ // to allow html comment in multiple lines
+ return html.replace(/<(.*?)>/g, '&lt;$1&gt;');
+ },
onIgnoreTag: function (tag, html, options) {
// allow style in html
if (whiteListTag.indexOf(tag) !== -1) {