Fixed margin property for blockquote inline replacement (use same as in css).

This commit is contained in:
Martin Edenhofer 2016-06-09 15:00:11 +02:00
parent 9169b6fb88
commit 5577753be7
2 changed files with 3 additions and 3 deletions

View file

@ -241,7 +241,7 @@ Add/change markup to display html in any mail client nice.
def self.html_mail_client_fixes(html)
# https://github.com/martini/zammad/issues/165
new_html = html.gsub('<blockquote type="cite">', '<blockquote type="cite" style="border-left: 2px solid blue; margin: 0px; padding: 8px 12px 8px 12px;">')
new_html = html.gsub('<blockquote type="cite">', '<blockquote type="cite" style="border-left: 2px solid blue; margin: 0 0 16px; padding: 8px 12px 8px 12px;">')
new_html.gsub!('<p>', '<p style="margin: 0;">')
new_html
end

View file

@ -177,13 +177,13 @@ text
html_with_fixes = Channel::EmailBuild.html_mail_client_fixes(html_raw)
assert_not_equal(html_with_fixes, html_raw)
html_should = '<blockquote type="cite" style="border-left: 2px solid blue; margin: 0px; padding: 8px 12px 8px 12px;">some
html_should = '<blockquote type="cite" style="border-left: 2px solid blue; margin: 0 0 16px; padding: 8px 12px 8px 12px;">some
text
</blockquote>
123
<blockquote type="cite" style="border-left: 2px solid blue; margin: 0px; padding: 8px 12px 8px 12px;">some
<blockquote type="cite" style="border-left: 2px solid blue; margin: 0 0 16px; padding: 8px 12px 8px 12px;">some
text
</blockquote>'
assert_equal(html_should, html_with_fixes)