mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
FIX: allow user quotes in HTML digest emails
This commit is contained in:
@ -34,5 +34,23 @@ describe UserNotificationsHelper do
|
||||
SiteSetting.digest_min_excerpt_length = 50
|
||||
expect(helper.email_excerpt(arg)).to eq([with_link, paragraphs[0]].join)
|
||||
end
|
||||
|
||||
it "uses user quotes but not post quotes" do
|
||||
cooked = <<~HTML
|
||||
<p>BEFORE</p>
|
||||
<blockquote>
|
||||
<p>This is a user quote</p>
|
||||
</blockquote>
|
||||
<aside class="quote" data-post="3" data-topic="87369">
|
||||
<div class="title">A Title</div>
|
||||
<blockquote>
|
||||
<p>This is a post quote</p>
|
||||
</blockquote>
|
||||
</aside>
|
||||
<p>AFTER</p>
|
||||
HTML
|
||||
|
||||
expect(helper.email_excerpt(cooked)).to eq "<p>BEFORE</p><blockquote>\n <p>This is a user quote</p>\n</blockquote><p>AFTER</p>"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user