|
@@ -552,8 +552,7 @@ Men-----------------------'
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
html = '<div>https://www.facebook.com/test</div>'
|
|
html = '<div>https://www.facebook.com/test</div>'
|
|
- result = '<div>
|
|
|
|
-<a href="https://www.facebook.com/test" rel="nofollow noreferrer noopener" target="_blank">https://www.facebook.com/test</a>
|
|
|
|
|
|
+ result = '<div><a href="https://www.facebook.com/test" rel="nofollow noreferrer noopener" target="_blank">https://www.facebook.com/test</a>
|
|
</div>'
|
|
</div>'
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
@@ -641,11 +640,11 @@ Men-----------------------'
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
html = "<div>http://example.com</div>"
|
|
html = "<div>http://example.com</div>"
|
|
- result = "<div>\n<a href=\"http://example.com\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">http://example.com</a>\n</div>"
|
|
|
|
|
|
+ result = "<div><a href=\"http://example.com\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">http://example.com</a>\n</div>"
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
html = "<div>http://example.com.</div>"
|
|
html = "<div>http://example.com.</div>"
|
|
- result = "<div>\n<a href=\"http://example.com\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">http://example.com</a>.</div>"
|
|
|
|
|
|
+ result = "<div><a href=\"http://example.com\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">http://example.com</a>.</div>"
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
html = "<div>lala http://example.com.</div>"
|
|
html = "<div>lala http://example.com.</div>"
|
|
@@ -653,11 +652,11 @@ Men-----------------------'
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
html = "<div>http://example.com, and so on</div>"
|
|
html = "<div>http://example.com, and so on</div>"
|
|
- result = "<div>\n<a href=\"http://example.com\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">http://example.com</a>, and so on</div>"
|
|
|
|
|
|
+ result = "<div><a href=\"http://example.com\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">http://example.com</a>, and so on</div>"
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
html = "<div>http://example.com?lala=me, and so on</div>"
|
|
html = "<div>http://example.com?lala=me, and so on</div>"
|
|
- result = "<div>\n<a href=\"http://example.com?lala=me\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">http://example.com?lala=me</a>, and so on</div>"
|
|
|
|
|
|
+ result = "<div><a href=\"http://example.com?lala=me\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">http://example.com?lala=me</a>, and so on</div>"
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
html = "<a href=\"http://facebook.de/examplesrbog\"><span lang=\"EN-US\" style='color:blue'>http://facebook.de/examplesrbog</span></a>"
|
|
html = "<a href=\"http://facebook.de/examplesrbog\"><span lang=\"EN-US\" style='color:blue'>http://facebook.de/examplesrbog</span></a>"
|
|
@@ -665,12 +664,12 @@ Men-----------------------'
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
html = "<span style=\"font-size:10.0pt;font-family:"Cambria",serif;color:#1F497D;mso-fareast-language:DE\">web
|
|
html = "<span style=\"font-size:10.0pt;font-family:"Cambria",serif;color:#1F497D;mso-fareast-language:DE\">web
|
|
-<a href=\"http://www.example.de\"><span style=\"color:blue\">www.example.de</span></a><o:p></o:p></span>"
|
|
|
|
- result = "web <a href=\"http://www.example.de\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">www.example.de</a>"
|
|
|
|
|
|
+<a href=\"http://www.example.com\"><span style=\"color:blue\">www.example.com</span></a><o:p></o:p></span>"
|
|
|
|
+ result = "web <a href=\"http://www.example.com\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">www.example.com</a>"
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
- html = "web <a href=\"www.example.de\"><span style=\"color:blue\">www.example.de</span></a>"
|
|
|
|
- result = "web <a href=\"http://www.example.de\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">www.example.de</a>"
|
|
|
|
|
|
+ html = "web <a href=\"www.example.com\"><span style=\"color:blue\">www.example.com</span></a>"
|
|
|
|
+ result = "web <a href=\"http://www.example.com\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">www.example.com</a>"
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
html = "Damit Sie keinen Tag versäumen, empfehlen wir Ihnen den <a href=\"http://newsletters.cylex.de/\" class=\"\">Link des Adventkalenders</a> in<br class=\"\"> Ihrer Lesezeichen-Symbolleiste zu ergänzen.</p><div class=\"\"> "
|
|
html = "Damit Sie keinen Tag versäumen, empfehlen wir Ihnen den <a href=\"http://newsletters.cylex.de/\" class=\"\">Link des Adventkalenders</a> in<br class=\"\"> Ihrer Lesezeichen-Symbolleiste zu ergänzen.</p><div class=\"\"> "
|
|
@@ -913,9 +912,9 @@ christian.schaefer@example.com'
|
|
result = '<img style="width: 181px; height: 125px;" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/...">'
|
|
result = '<img style="width: 181px; height: 125px;" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/...">'
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
- html = '<p class="MsoNormal"><a href="http://www.example.de/"><span style="color:blue;text-decoration:none"><img border="0" width="30" height="30" id="_x0000_i1030" src="cid:image001.png@01D172FC.F323CDB0"></span></a><o:p></o:p></p>'
|
|
|
|
- #result = '<p>http://www.example.de/ <a href="http://www.example.de/" rel="nofollow noreferrer noopener" target="_blank"><img border="0" src="cid:image001.png@01D172FC.F323CDB0" style="width:30px;height:30px;"></a></p>'
|
|
|
|
- result = '<p><a href="http://www.example.de/" rel="nofollow noreferrer noopener" target="_blank">http://www.example.de/</a></p>'
|
|
|
|
|
|
+ html = '<p class="MsoNormal"><a href="http://www.example.com/"><span style="color:blue;text-decoration:none"><img border="0" width="30" height="30" id="_x0000_i1030" src="cid:image001.png@01D172FC.F323CDB0"></span></a><o:p></o:p></p>'
|
|
|
|
+ #result = '<p>http://www.example.com/ <a href="http://www.example.com/" rel="nofollow noreferrer noopener" target="_blank"><img border="0" src="cid:image001.png@01D172FC.F323CDB0" style="width:30px;height:30px;"></a></p>'
|
|
|
|
+ result = '<p><a href="http://www.example.com/" rel="nofollow noreferrer noopener" target="_blank">http://www.example.com/</a></p>'
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
html = '<p><a style="color: " href="http://www.example.com/?wm=mail"><img border="0" src="cid:example_new.png@8B201D8C.000B" width="101" height="30"></a></p>'
|
|
html = '<p><a style="color: " href="http://www.example.com/?wm=mail"><img border="0" src="cid:example_new.png@8B201D8C.000B" width="101" height="30"></a></p>'
|
|
@@ -940,6 +939,10 @@ christian.schaefer@example.com'
|
|
result = '<p>oh jeee … Zauberwort vergessen ;-) Können Sie mir <b>bitte</b> noch meine Testphase verlängern?</p><p> </p>'
|
|
result = '<p>oh jeee … Zauberwort vergessen ;-) Können Sie mir <b>bitte</b> noch meine Testphase verlängern?</p><p> </p>'
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|
|
|
|
|
|
|
|
+ html = '<div><a href="http://www.example.com/Community/Passwort-Vergessen/?module_fnc=ChangeForgotPassword&pwchangekey=66901c449dda98a098de4b57ccdf0805" title="http://www.example.com/Community/Passwort-Vergessen/?module_fnc%5BextranetHandler%5D=ChangeForgotPassword&pwchangekey=66901c449dda98a098de4b57ccdf0805" rel="nofollow" target="_blank">http://www.example.com/Community/Passwort-Vergessen/?module_fnc%5BextranetHandler%5D=ChangeForgotPassword&pwchangekey=66901c449dda98a098de4b57ccdf0805</a></div>'
|
|
|
|
+ result = '<div><a href="http://www.example.com/Community/Passwort-Vergessen/?module_fnc%5BextranetHandler%5D=ChangeForgotPassword&pwchangekey=66901c449dda98a098de4b57ccdf0805" rel="nofollow noreferrer noopener" target="_blank">http://www.example.com/Community/Passwort-Vergessen/?module_fnc%5BextranetHandler%5D=ChangeForgotPassword&pwchangekey=66901c449dda98a098de4b57ccdf0805</a> (<a href="http://www.example.com/Community/Passwort-Vergessen/?module_fnc=ChangeForgotPassword&pwchangekey=66901c449dda98a098de4b57ccdf0805" title="http://www.example.com/Community/Passwort-Vergessen/?module_fnc%5BextranetHandler%5D=ChangeForgotPassword&pwchangekey=66901c449dda98a098de4b57ccdf0805" rel="nofollow noreferrer noopener" target="_blank">http://www.example.com/Community/Passwort-Vergessen/?module_fnc=ChangeForgotPassword&pwchangekey=66901c449dda98a098de4b57ccdf0805</a>)</div>'
|
|
|
|
+ assert_equal(result, html.html2html_strict)
|
|
|
|
+
|
|
end
|
|
end
|
|
|
|
|
|
test 'inline attachment replace' do
|
|
test 'inline attachment replace' do
|
|
@@ -1106,10 +1109,10 @@ christian.schaefer@example.com'
|
|
html = '<div><br>
|
|
html = '<div><br>
|
|
<br>
|
|
<br>
|
|
<br><font size=1 color=#5f5f5f face="sans-serif">Von:
|
|
<br><font size=1 color=#5f5f5f face="sans-serif">Von:
|
|
- </font><font size=1 face="sans-serif">Hotel <info@example.de></font>
|
|
|
|
|
|
+ </font><font size=1 face="sans-serif">Hotel <info@example.com></font>
|
|
<br><font size=1 color=#5f5f5f face="sans-serif">An:
|
|
<br><font size=1 color=#5f5f5f face="sans-serif">An:
|
|
</font></div>'
|
|
</font></div>'
|
|
- result = '<span class="js-signatureMarker"></span><div><br>Von: Hotel <info@example.de>
|
|
|
|
|
|
+ result = '<span class="js-signatureMarker"></span><div><br>Von: Hotel <info@example.com>
|
|
<br>An:
|
|
<br>An:
|
|
</div>'
|
|
</div>'
|
|
assert_equal(result, html.html2html_strict)
|
|
assert_equal(result, html.html2html_strict)
|