Revert "UX: Better emoji escaping for topic title (#7176)" (#7201)

This reverts commit 0d9bc0aaa6dde5a49b9315124a6343a8ffb41a16.
This commit is contained in:
Régis Hanol
2019-03-19 12:02:47 +01:00
committed by GitHub
parent 31e06dbcd2
commit 6fb49e74a1
7 changed files with 25 additions and 77 deletions

View File

@ -279,7 +279,6 @@ describe Topic do
let(:topic_image) { build_topic_with_title("Topic with <img src='something'> image in its title") }
let(:topic_script) { build_topic_with_title("Topic with <script>alert('title')</script> script in its title") }
let(:topic_emoji) { build_topic_with_title("I 💖 candy alot") }
let(:topic_modifier_emoji) { build_topic_with_title("I 👨‍🌾 candy alot") }
it "escapes script contents" do
expect(topic_script.fancy_title).to eq("Topic with &lt;script&gt;alert(&lsquo;title&rsquo;)&lt;/script&gt; script in its title")
@ -289,10 +288,6 @@ describe Topic do
expect(topic_emoji.fancy_title).to eq("I :sparkling_heart: candy alot")
end
it "keeps combined emojis" do
expect(topic_modifier_emoji.fancy_title).to eq("I :man_farmer: candy alot")
end
it "escapes bold contents" do
expect(topic_bold.fancy_title).to eq("Topic with &lt;b&gt;bold&lt;/b&gt; text in its title")
end