mirror of
https://github.com/discourse/discourse.git
synced 2025-06-17 04:42:31 +08:00
SECURITY: sanitize markdown urls (prevent XSS)
This commit is contained in:
@ -352,6 +352,8 @@ test("sanitize", function() {
|
||||
equal(sanitize("<textarea>hullo</textarea>"), "hullo");
|
||||
equal(sanitize("<button>press me!</button>"), "press me!");
|
||||
equal(sanitize("<canvas>draw me!</canvas>"), "draw me!");
|
||||
|
||||
cooked("[the answer](javascript:alert(42))", "<p><a>the answer</a></p>", "it prevents XSS");
|
||||
});
|
||||
|
||||
test("URLs in BBCode tags", function() {
|
||||
|
Reference in New Issue
Block a user