mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 02:14:58 +08:00
FEATURE: Nokogumbo (#9577)
* FEATURE: Nokogumbo Use Nokogumbo HTML parser.
This commit is contained in:

committed by
GitHub

parent
b8b1cbbfb9
commit
9bff0882c3
@ -14,7 +14,7 @@ describe TopicEmbed do
|
||||
fab!(:user) { Fabricate(:user) }
|
||||
let(:title) { "How to turn a fish from good to evil in 30 seconds" }
|
||||
let(:url) { 'http://eviltrout.com/123' }
|
||||
let(:contents) { "hello world new post <a href='/hello'>hello</a> <img src='/images/wat.jpg'>" }
|
||||
let(:contents) { "<p>hello world new post <a href='/hello'>hello</a> <img src='/images/wat.jpg'></p>" }
|
||||
fab!(:embeddable_host) { Fabricate(:embeddable_host) }
|
||||
|
||||
it "returns nil when the URL is malformed" do
|
||||
@ -46,7 +46,7 @@ describe TopicEmbed do
|
||||
|
||||
it "Supports updating the post content" do
|
||||
expect do
|
||||
TopicEmbed.import(user, url, "New title received", "muhahaha new contents!")
|
||||
TopicEmbed.import(user, url, "New title received", "<p>muhahaha new contents!</p>")
|
||||
end.to change { topic_embed.reload.content_sha1 }
|
||||
expect(topic_embed.topic.title).to eq("New title received")
|
||||
|
||||
|
Reference in New Issue
Block a user