Fixes #4112 - Zammad shows "<![if !supportLists]>- <![endif]>" instead of list icon
This commit is contained in:
parent
74c7a6b5f6
commit
f7f1068bf0
2 changed files with 17 additions and 0 deletions
|
@ -349,6 +349,9 @@ class String
|
||||||
string.gsub!(%r{[[:space:]]*(<br(|/)>[[:space:]]*)*\Z}i, '')
|
string.gsub!(%r{[[:space:]]*(<br(|/)>[[:space:]]*)*\Z}i, '')
|
||||||
string.gsub!(%r{(<p></p>){1,10}\Z}i, '')
|
string.gsub!(%r{(<p></p>){1,10}\Z}i, '')
|
||||||
|
|
||||||
|
# https://github.com/zammad/zammad/issues/4112
|
||||||
|
string.gsub!(%r{<!\[if !supportLists\]>.+?<!\[endif\]>}, '• ')
|
||||||
|
|
||||||
string.signature_identify('html')
|
string.signature_identify('html')
|
||||||
|
|
||||||
marker_template = '<span class="js-signatureMarker"></span>'
|
marker_template = '<span class="js-signatureMarker"></span>'
|
||||||
|
|
|
@ -1430,6 +1430,20 @@ RSpec.describe String do
|
||||||
<li><a href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NVTGVpNWZ8fGZh" rel="nofollow noreferrer noopener" target="_blank" title="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NVTGVpNWZ8fGZh">Luxemburg</a></li>
|
<li><a href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NVTGVpNWZ8fGZh" rel="nofollow noreferrer noopener" target="_blank" title="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NVTGVpNWZ8fGZh">Luxemburg</a></li>
|
||||||
TEXT
|
TEXT
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# https://github.com/zammad/zammad/issues/4112
|
||||||
|
it 'converts lists from MS Outlook correctly' do
|
||||||
|
expect(<<~HTML.chomp.html2html_strict).to eq(<<~TEXT.chomp)
|
||||||
|
<p class="MsoPlainText" style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
|
||||||
|
<![if !supportLists]><span style="font-family:Symbol;mso-fareast-language:EN-US"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
|
||||||
|
</span></span></span><![endif]><span style="mso-fareast-language:EN-US">1<o:p></o:p></span></p>
|
||||||
|
<p class="MsoPlainText" style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
|
||||||
|
<![if !supportLists]><span style="font-family:Symbol;mso-fareast-language:EN-US"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
|
||||||
|
</span></span></span><![endif]><span style="mso-fareast-language:EN-US">2<o:p></o:p></span></p>
|
||||||
|
HTML
|
||||||
|
<p>• 1</p><p>• 2</p>
|
||||||
|
TEXT
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'signature recognition' do
|
context 'signature recognition' do
|
||||||
|
|
Loading…
Reference in a new issue