mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 02:51:14 +08:00
SECURITY: fix XSS
This commit is contained in:
@ -261,6 +261,7 @@ class DiscourseDiff
|
||||
end
|
||||
|
||||
def characters(string)
|
||||
string = CGI::escapeHTML(string)
|
||||
@tokens.concat string.scan(/(\W|\w+[ \t]*)/).flatten
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user