Skip to content

Commit a5bf8e9

Browse files
committed
add strike to allowed tags
1 parent 6a71d01 commit a5bf8e9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/hooks/xss.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function clean (dirty) {
1717
// Convert embeds to a-tags
1818
dirty = embedToAnchor(dirty);
1919
dirty = sanitizeHtml(dirty, {
20-
allowedTags: ['iframe', 'img', 'p', 'br', 'b', 'i', 'em', 'strong', 'a', 'pre', 'ul', 'li', 'ol', 'span', 'blockquote'],
20+
allowedTags: ['iframe', 'img', 'p', 'br', 'b', 'i', 'em', 'strong', 'a', 'pre', 'ul', 'li', 'ol', 's', 'strike', 'span', 'blockquote'],
2121
allowedAttributes: {
2222
a: ['href', 'class', 'target', 'data-*'],
2323
img: [ 'src' ],
@@ -38,7 +38,8 @@ function clean (dirty) {
3838
// }
3939
// };
4040
// },
41-
b: 'strong'
41+
b: 'strong',
42+
s: 'strike'
4243
// 'img': function (tagName, attribs) {
4344
// let src = attribs.src;
4445
// if (_.isEmpty(hook.result)) {

0 commit comments

Comments
 (0)