Fix sanitization of smileys like <_< and <3.
This commit is contained in:
parent
c930fe41b2
commit
fad88c6cf3
2 changed files with 3 additions and 0 deletions
app/assets/javascripts/discourse/lib
|
@ -154,6 +154,7 @@ Discourse.Markdown = {
|
|||
**/
|
||||
sanitize: function(text) {
|
||||
if (!window.html_sanitize) return "";
|
||||
text = text.replace(/<([^A-Za-z\/]|$)/g, "<$1");
|
||||
return window.html_sanitize(text, Discourse.Markdown.urlAllowed, Discourse.Markdown.nameIdClassAllowed);
|
||||
},
|
||||
|
||||
|
|
Reference in a new issue