Remove censored_pattern site setting, which is replaced by watched words

This commit is contained in:
Neil Lalonde
2018-02-26 15:48:59 -05:00
parent 5ca5817902
commit 3313072957
31 changed files with 28 additions and 102 deletions

View File

@ -13,7 +13,6 @@ const rawOpts = {
emoji_set: 'emoji_one',
highlighted_languages: 'json|ruby|javascript',
default_code_lang: 'auto',
censored_pattern: '\\d{3}-\\d{4}|tech\\w*',
enable_markdown_linkify: true,
markdown_linkify_tlds: 'com'
},
@ -601,7 +600,7 @@ QUnit.test("censoring", assert => {
"it won't break links by censoring them.");
assert.cooked("Call techapj the computer whiz at 555-555-1234 for free help.",
"<p>Call ■■■■■■■ the computer ■■■■ at 555-■■■■■■■■ for free help.</p>",
"<p>Call techapj the computer ■■■■ at 555-555-1234 for free help.</p>",
"uses both censored words and patterns from site settings");
assert.cooked("I have a pen, I have an a**le",
@ -614,8 +613,7 @@ QUnit.test("censoring", assert => {
assert.cookedOptions(
"Pleased to meet you, but pleeeease call me later, xyz123",
{ siteSettings: {
watched_words_regular_expressions: true,
censored_pattern: null
watched_words_regular_expressions: true
},
censoredWords: 'xyz*|plee+ase'
},
@ -625,8 +623,7 @@ QUnit.test("censoring", assert => {
assert.cookedOptions(
"Meet downtown in your town at the townhouse on Main St.",
{ siteSettings: {
watched_words_regular_expressions: true,
censored_pattern: null
watched_words_regular_expressions: true
},
censoredWords: '\\btown\\b'
},