mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: support for watched_words_regular_expressions when censoring words
This commit is contained in:
parent
213cc2fe51
commit
edb3a7f646
4 changed files with 29 additions and 5 deletions
|
@ -607,6 +607,17 @@ QUnit.test("censoring", assert => {
|
|||
assert.cooked("No badword or apple here plz.",
|
||||
"<p>No ■■■■■■■ or ■■■■■ here plz.</p>",
|
||||
"it handles * as wildcard");
|
||||
|
||||
assert.cookedOptions(
|
||||
"Pleased to meet you, but pleeeease call me later, xyz123",
|
||||
{ siteSettings: {
|
||||
watched_words_regular_expressions: true,
|
||||
censored_pattern: null
|
||||
},
|
||||
censoredWords: 'xyz*|plee+ase'
|
||||
},
|
||||
"<p>Pleased to meet you, but ■■■■■■■■■ call me later, ■■■123</p>",
|
||||
"supports words as regular expressions");
|
||||
});
|
||||
|
||||
QUnit.test("code blocks/spans hoisting", assert => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue