mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 18:51:48 +08:00
Remove censored_pattern site setting, which is replaced by watched words
This commit is contained in:
@ -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'
|
||||
},
|
||||
|
Reference in New Issue
Block a user