mirror of
https://github.com/discourse/discourse.git
synced 2025-06-11 22:05:54 +08:00
FEATURE: Site setting for words to censor in posts
This commit is contained in:
@ -471,7 +471,6 @@ test("urlAllowed", function() {
|
||||
});
|
||||
|
||||
test("images", function() {
|
||||
|
||||
cooked("[](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 ■■■■■■, golly gee ■■■■.</p>",
|
||||
"it censors words in the Site Settings");
|
||||
});
|
||||
|
Reference in New Issue
Block a user