mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Spoiler logic should live inside of spoiler plugin
This commit removes logic about spoilers because it should live inside of the discourse-spoiler-alert plugin. This PR: https://github.com/discourse/discourse-spoiler-alert/pull/38 also completely removes spoilers from excerpts in order to keep them from leaking in topic previews and notifications.
This commit is contained in:
@@ -589,11 +589,6 @@ describe PrettyText do
|
||||
expect(PrettyText.excerpt("<img src='http://cnn.com/a.gif' title='car'>", 100, markdown_images: true)).to eq("")
|
||||
end
|
||||
|
||||
it "should keep spoilers" do
|
||||
expect(PrettyText.excerpt("<div class='spoiler'><img src='http://cnn.com/a.gif'></div>", 100)).to match_html "<span class='spoiler'>[image]</span>"
|
||||
expect(PrettyText.excerpt("<span class='spoiler'>spoiler</div>", 100)).to match_html "<span class='spoiler'>spoiler</span>"
|
||||
end
|
||||
|
||||
it "should keep details if too long" do
|
||||
expect(PrettyText.excerpt("<details><summary>expand</summary><p>hello</p></details>", 6)).to match_html "<details class='disabled'><summary>expand</summary></details>"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user