FEATURE: Site setting for words to censor in posts

This commit is contained in:
Robin Ward
2014-10-02 13:58:36 -04:00
parent b58435de90
commit 9564ecde76
7 changed files with 41 additions and 5 deletions

View File

@ -471,7 +471,6 @@ test("urlAllowed", function() {
});
test("images", function() {
cooked("[![folksy logo](http://folksy.com/images/folksy-colour.png)](http://folksy.com/)",
"<p><a href=\"http://folksy.com/\"><img src=\"http://folksy.com/images/folksy-colour.png\" alt=\"folksy logo\"/></a></p>",
"It allows images with links around them");
@ -480,3 +479,10 @@ test("images", function() {
"<p><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Red dot\"></p>",
"It allows data images");
});
test("censoring", function() {
Discourse.SiteSettings.censored_words = "shucks|whiz";
cooked("aw shucks, golly gee whiz.",
"<p>aw &#9632;&#9632;&#9632;&#9632;&#9632;&#9632;, golly gee &#9632;&#9632;&#9632;&#9632;.</p>",
"it censors words in the Site Settings");
});