Skip to content

Commit f927306

Browse files
authored
Merge pull request Human-Connection#24 from Human-Connection/feature/editor-mentions-not-editable
keep contenteditable attribute in editor content
2 parents 0cd3193 + fe4ceff commit f927306

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/hooks/xss.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ function clean (dirty) {
2424
dirty = sanitizeHtml(dirty, {
2525
allowedTags: ['iframe', 'img', 'p', 'br', 'b', 'i', 'em', 'strong', 'a', 'pre', 'ul', 'li', 'ol', 's', 'strike', 'span', 'blockquote'],
2626
allowedAttributes: {
27-
a: ['href', 'class', 'target', 'data-*'],
28-
img: [ 'src' ],
27+
a: ['href', 'class', 'target', 'data-*' , 'contenteditable'],
28+
span: ['contenteditable'],
29+
img: ['src'],
2930
iframe: ['src', 'class', 'frameborder', 'allowfullscreen']
3031
},
3132
allowedIframeHostnames: ['www.youtube.com', 'player.vimeo.com'],

0 commit comments

Comments
 (0)