mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 01:17:16 +08:00
Remove censored_pattern site setting, which is replaced by watched words
This commit is contained in:
@ -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>")
|
||||
|
Reference in New Issue
Block a user