mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: XSS in markdown converter.
This commit is contained in:
@ -354,6 +354,8 @@ test("sanitize", function() {
|
||||
equal(sanitize("<canvas>draw me!</canvas>"), "draw me!");
|
||||
|
||||
cooked("[the answer](javascript:alert(42))", "<p><a>the answer</a></p>", "it prevents XSS");
|
||||
|
||||
cooked("<i class=\"fa fa-bug fa-spin\" style=\"font-size:600%\"></i>\n<!-- -->", "<p><i></i><br/><!-- --></p>", "it doesn't circumvent XSS with comments");
|
||||
});
|
||||
|
||||
test("URLs in BBCode tags", function() {
|
||||
|
Reference in New Issue
Block a user