Fixed margin property for blockquote inline replacement (use same as in css).
This commit is contained in:
parent
9169b6fb88
commit
5577753be7
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue