mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Enable preserve_email_structure_when_styling by default
In 1bd8a075, a hidden site setting was added that causes Email::Styles
to treat its input as a complete document in all cases.
This commit enables that setting by default.
Some tests were removed that were broken by this change. They tested the
behaviour of applying email styles to empty strings. They weren't useful
because:
* Sending empty email is not something we ever intend to do,
* They were testing incidental behaviour - there are lots of
valid ways to process the empty string,
* Their intent wasn't clear from their descriptions,
This commit is contained in:
@@ -8,8 +8,8 @@ describe EmailStyle do
|
||||
it "does not evaluate ERB outside of the email itself" do
|
||||
SiteSetting.email_custom_template = "<hello>%{email_content}</hello><%= (111 * 333) %>"
|
||||
html = Email::Renderer.new(UserNotifications.signup(Fabricate(:user))).html
|
||||
expect(html).not_to match("36963")
|
||||
expect(html.starts_with?('<hello>')).to eq(true)
|
||||
expect(html).not_to include("36963")
|
||||
expect(html).to include('<hello>')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user