diff --git a/app/models/channel/email_build.rb b/app/models/channel/email_build.rb index 6778481c9..22c8082ca 100644 --- a/app/models/channel/email_build.rb +++ b/app/models/channel/email_build.rb @@ -241,9 +241,9 @@ 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 - html.gsub!('
', '
') - html.gsub('

', '

') - + new_html = html.gsub('

', '
') + new_html.gsub!('

', '

') + new_html end end diff --git a/test/unit/email_build_test.rb b/test/unit/email_build_test.rb index 1eecdbe9a..4c592a347 100644 --- a/test/unit/email_build_test.rb +++ b/test/unit/email_build_test.rb @@ -175,7 +175,6 @@ text text

' html_with_fixes = Channel::EmailBuild.html_mail_client_fixes(html_raw) - assert_not_equal(html_with_fixes, html_raw) html_should = '
some @@ -187,9 +186,20 @@ text
some text
' - assert_equal(html_should, html_with_fixes) + html_raw = '

some +text +

+

123

' + html_with_fixes = Channel::EmailBuild.html_mail_client_fixes(html_raw) + assert_not_equal(html_with_fixes, html_raw) + + html_should = '

some +text +

+

123

' + assert_equal(html_should, html_with_fixes) end end