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

@ -776,15 +776,6 @@ describe PrettyText do
end
end
describe "censored_pattern site setting" do
it "can be cleared if it causes cooking to timeout" do
SiteSetting.censored_pattern = "evilregex"
described_class.stubs(:markdown).raises(MiniRacer::ScriptTerminatedError)
PrettyText.cook("Protect against it plz.") rescue nil
expect(SiteSetting.censored_pattern).to be_blank
end
end
it "replaces skin toned emoji" do
expect(PrettyText.cook("hello 👱🏿‍♀️")).to eq("<p>hello <img src=\"/images/emoji/twitter/blonde_woman/6.png?v=5\" title=\":blonde_woman:t6:\" class=\"emoji\" alt=\":blonde_woman:t6:\"></p>")
expect(PrettyText.cook("hello 👩‍🎤")).to eq("<p>hello <img src=\"/images/emoji/twitter/woman_singer.png?v=5\" title=\":woman_singer:\" class=\"emoji\" alt=\":woman_singer:\"></p>")