SECURITY: fix XSS

This commit is contained in:
Sam Saffron
2014-06-16 10:24:54 +10:00
parent 258c353307
commit d65efe7304
2 changed files with 12 additions and 0 deletions

View File

@ -261,6 +261,7 @@ class DiscourseDiff
end
def characters(string)
string = CGI::escapeHTML(string)
@tokens.concat string.scan(/(\W|\w+[ \t]*)/).flatten
end