Convert all CoffeeScript to Javascript. See:
http://meta.discourse.org/t/is-it-better-for-discourse-to-use-javascript-or-coffeescript/3153
This commit is contained in:
parent
68ad545f0f
commit
f661fa609e
407 changed files with 13226 additions and 8953 deletions
spec/javascripts
|
@ -1,15 +1,17 @@
|
|||
/*global waitsFor:true expect:true describe:true beforeEach:true it:true sanitizeHtml:true */
|
||||
|
||||
describe("sanitize", function(){
|
||||
|
||||
|
||||
it("strips all script tags", function(){
|
||||
sanitized = sanitizeHtml("<div><script>alert('hi');</script></div>");
|
||||
var sanitized = sanitizeHtml("<div><script>alert('hi');</script></div>");
|
||||
|
||||
expect(sanitized)
|
||||
.toBe("<div></div>");
|
||||
});
|
||||
|
||||
it("strips disallowed attributes", function(){
|
||||
sanitized = sanitizeHtml("<div><p class=\"funky\" wrong='1'>hello</p></div>");
|
||||
var sanitized = sanitizeHtml("<div><p class=\"funky\" wrong='1'>hello</p></div>");
|
||||
|
||||
expect(sanitized)
|
||||
.toBe("<div><p class=\"funky\">hello</p></div>");
|
||||
|
|
Reference in a new issue