Strip beginning and ending new lines. Improved layout of own quoted messages.

This commit is contained in:
Martin Edenhofer 2017-03-13 19:38:29 +01:00
parent c3a1ce393c
commit b2b835bcc5
8 changed files with 142 additions and 65 deletions

View file

@ -4561,7 +4561,6 @@ footer {
padding: 0 55px;
}
.article-content-meta {
position: absolute;
width: 100%;
@ -4663,7 +4662,7 @@ footer {
left: 0;
right: 0;
background: white;
&.is-open {
&:before {
opacity: 0;
@ -4701,6 +4700,10 @@ footer {
box-shadow: none;
}
.customer .richtext-content blockquote {
border-left: 5px solid #dfdfdf;
}
.customer.ticket-article-item.state--folde-out .textBubble {
border-color: hsl(199,44%,85%);
}

View file

@ -24,7 +24,7 @@ Rails.application.config.html_sanitizer_tags_whitelist = %w(
# attributes allowed for tags
Rails.application.config.html_sanitizer_attributes_whitelist = {
:all => %w(class dir lang style title translate data-signature data-signature-id),
:all => %w(class dir lang title translate data-signature data-signature-id),
'a' => %w(href hreflang name rel),
'abbr' => %w(title),
'blockquote' => %w(type cite),
@ -33,7 +33,7 @@ Rails.application.config.html_sanitizer_attributes_whitelist = {
'data' => %w(value),
'del' => %w(cite datetime),
'dfn' => %w(title),
'img' => %w(align alt border height src srcset width),
'img' => %w(align alt border height src srcset width style),
'ins' => %w(cite datetime),
'li' => %w(value),
'ol' => %w(reversed start type),

View file

@ -301,17 +301,18 @@ class String
string.gsub!(/######SIGNATURE_MARKER######/, '')
return string.chomp
end
#string.gsub!(/<p>[[:space:]]+<\/p><p>[[:space:]]+<\/p>/m, '<p> </p>')
string.gsub!(%r{<p>[[:space:]]+</p>\n<p>[[:space:]]+</p>}im, '<p> </p>')
string.gsub!(%r{<div>[[:space:]]+</div>\n<div>[[:space:]]+</div>}im, '<div> </div>')
string.gsub!(/<br>[[:space:]]?<br>[[:space:]]?<br>/im, '<br><br>')
string.gsub!(/<br>[[:space:]]?<br>[[:space:]]?<br>/im, '<br><br>')
string.gsub!(/<br>[[:space:]]?<br>[[:space:]]?<br>/im, '<br><br>')
string.gsub!(%r{<br/>[[:space:]]?<br/>[[:space:]]?<br/>}im, '<br/><br/>')
string.gsub!(%r{<br/>[[:space:]]?<br/>[[:space:]]?<br/>}im, '<br/><br/>')
string.gsub!(%r{<br/>[[:space:]]?<br/>[[:space:]]?<br/>}im, '<br/><br/>')
string.gsub!(%r{(<p>[[:space:]]*</p>([[:space:]]*)){2,}}im, '<p> </p>\2')
string.gsub!(%r\<div>[[:space:]]*(<br(|/)>([[:space:]]*)){2,}\im, '<div><br>\3')
string.gsub!(%r\[[:space:]]*(<br>[[:space:]]*){3,}[[:space:]]*</div>\im, '<br><br></div>')
string.gsub!(%r\<div>[[:space:]]*(<br>[[:space:]]*){1,}[[:space:]]*</div>\im, '<div> </div>')
string.gsub!(%r\<p>[[:space:]]*</p>(<br(|/)>[[:space:]]*){2,}[[:space:]]*\im, '<p> </p><br>')
string.gsub!(%r{<p>[[:space:]]*</p>(<br(|/)>[[:space:]]*)+<p>[[:space:]]*</p>}im, '<p> </p><p> </p>')
string.gsub!(%r\(<div>[[:space:]]*</div>[[:space:]]*){2,}\im, '<div> </div>')
string.gsub!(/(<br>[[:space:]]*){3,}/im, '<br><br>')
string.gsub!(%r\(<br(|/)>[[:space:]]*){3,}\im, '<br/><br/>')
string.gsub!(%r{<p>[[:space:]]+</p>}im, '<p>&nbsp;</p>')
string.gsub!(%r{\A(<br(|\/)>[[:space:]]*)*}i, '')
string.gsub!(%r{[[:space:]]*(<br(|\/)>[[:space:]]*)*\Z}i, '')
string.signature_identify('html')
@ -332,7 +333,7 @@ class String
'<\/div>[[:space:]]*(--|__)',
'<p>[[:space:]]*(--|__)',
'(<br(|\/)>|<p>|<div>)[[:space:]]*<b>(Von|From|De|от|Z|Od|Ze|Fra|Van|Mistä|Από|Dal|から|Из|од|iz|Från|จาก|з|Từ):[[:space:]]*</b>',
'<br>[[:space:]]*<br>[[:space:]]*(Von|From|De|от|Z|Od|Ze|Fra|Van|Mistä|Από|Dal|から|Из|од|iz|Från|จาก|з|Từ):[[:space:]]+',
'(<br>|<div>)[[:space:]]*<br>[[:space:]]*(Von|From|De|от|Z|Od|Ze|Fra|Van|Mistä|Από|Dal|から|Из|од|iz|Från|จาก|з|Từ):[[:space:]]+',
'<blockquote(|.+?)>[[:space:]]*<div>[[:space:]]*(On|Am)',
]
map.each { |regexp|

View file

@ -109,6 +109,12 @@ AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
assert_equal(0, ticket.articles[0].attachments.count)
assert_equal(0, ticket.articles[1].attachments.count)
assert_equal(1, ticket.articles[2].attachments.count)
assert(ticket.articles[2].attachments[0]['id'])
assert_match(/@zammad.example.com/, ticket.articles[2].attachments[0]['filename'])
assert_equal('21', ticket.articles[2].attachments[0]['size'])
assert_equal('image/png', ticket.articles[2].attachments[0]['preferences']['Mime-Type'])
assert_equal('inline', ticket.articles[2].attachments[0]['preferences']['Content-Disposition'])
assert_match(/@zammad.example.com/, ticket.articles[2].attachments[0]['preferences']['Content-ID'])
params = {
ticket_id: result['ticket_id'],
@ -142,6 +148,10 @@ AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
result = JSON.parse(@response.body)
assert_equal(Hash, result.class)
assert_equal(1, result['attachments'].count)
assert(result['attachments'][0]['id'])
assert_equal('some_file.txt', result['attachments'][0]['filename'])
assert_equal('8', result['attachments'][0]['size'])
assert_equal('text/plain', result['attachments'][0]['preferences']['Mime-Type'])
end
test '02.01 ticket create with customer and articles' do

View file

@ -467,11 +467,41 @@ Men-----------------------'
assert_equal(result, html.html2html_strict)
html = "<div><p> </p><p> </p></div>"
result = "<div>\n<p>&nbsp;</p>\n</div>"
result = "<div>
<p>&nbsp;</p>
</div>"
assert_equal(result, html.html2html_strict)
html = "<div><div> </div><div> </div></div>"
result = "<div>\n<div> </div>\n</div>"
result = "<div>\n<div> </div></div>"
assert_equal(result, html.html2html_strict)
html = "<div><div> </div><div> </div><div> </div></div>"
result = "<div>\n<div> </div></div>"
assert_equal(result, html.html2html_strict)
html = "<div>
<br> <br> </div>"
result = "<div> </div>"
assert_equal(result, html.html2html_strict)
html = '<div>
<br> <p><b>Description</b></p>
<br> <br> </div>'
result = '<div>
<br> <p><b>Description</b></p>
<br> <br> </div>'
assert_equal(result, html.html2html_strict)
html = '<div>
<br> <p><b>Description</b></p>
<br> <br> <br> </div>'
result = '<div>
<br> <p><b>Description</b></p><br><br></div>'
assert_equal(result, html.html2html_strict)
html = '<p>&nbsp;</p><br><br><p>&nbsp;</p>'
result = '<p>&nbsp;</p><p>&nbsp;</p>'
assert_equal(result, html.html2html_strict)
html = "<pre>a\nb\nc</pre>"
@ -517,8 +547,15 @@ Men-----------------------'
result = '<a href="http://web.de" rel="nofollow" target="_blank">web.de</a>'
assert_equal(result, html.html2html_strict)
html = '<br>https://www.facebook.com/test<br>'
result = '<br><a href="https://www.facebook.com/test" rel="nofollow" target="_blank">https://www.facebook.com/test</a><br>'
html = '<div>https://www.facebook.com/test</div>'
result = '<div><a href="https://www.facebook.com/test" rel="nofollow" target="_blank">https://www.facebook.com/test</a>
</div>'
assert_equal(result, html.html2html_strict)
html = '<div><br>https://www.facebook.com/test<br></div>'
result = '<div>
<br><a href="https://www.facebook.com/test" rel="nofollow" target="_blank">https://www.facebook.com/test</a><br>
</div>'
assert_equal(result, html.html2html_strict)
html = 'some text http://example.com some other text'
@ -630,16 +667,15 @@ abc<p><b>Von:</b> Fritz Bauer [mailto:me@example.com] <br><b>Gesendet:</b> Donne
<td colspan=2 bgcolor=white><font size=2 face="sans-serif">christian.schaefer@example.com</font></table>
<br>
<table>'
result = "<br><b>Franz Schäfer</b><br><br><br><br>Telefon\n+49 000 000 8565<br>\nchristian.schaefer@example.com<br><br><br>"
result = '<br>
<b>Franz Schäfer</b>
result = "<b>Franz Schäfer</b><br><br><br><br>Telefon\n+49 000 000 8565<br>\nchristian.schaefer@example.com<br><br><br>"
result = '<b>Franz Schäfer</b>
<br>
Manager Information Systems <br>
<br>
Telefon
+49 000 000 8565
<br>
christian.schaefer@example.com <br>'
christian.schaefer@example.com'
assert_equal(result, html.html2html_strict)
html = "<b id=123 classs=\"\nsome_class\">test</b>"
@ -670,6 +706,37 @@ christian.schaefer@example.com <br>'
result = ''
assert_equal(result, html.html2html_strict)
html = '<br><br><div>abc</div>'
result = '<div>abc</div>'
assert_equal(result, html.html2html_strict)
html = '<div>abc</div><br> <br>'
result = '<div>abc</div>'
assert_equal(result, html.html2html_strict)
html = '<div style="max-width: 600px;"><br><br><br></div>'
result = '<div> </div>'
assert_equal(result, html.html2html_strict)
html = '<div style="max-width: 600px;"><br>abc<br><br></div>'
result = '<div>
<br>abc<br><br>
</div>'
assert_equal(result, html.html2html_strict)
html = '<p> </p><p> </p><p> </p>'
result = '<p>&nbsp;</p>'
assert_equal(result, html.html2html_strict)
html = '<div><p> </p>
<p> </p>
<p> </p>
</div>'
result = '<div>
<p>&nbsp;</p>
</div>'
assert_equal(result, html.html2html_strict)
html = '<p lang="DE"><b><span></span></b></p>'
result = '<p lang="DE"></p>'
assert_equal(result, html.html2html_strict)
@ -901,25 +968,26 @@ christian.schaefer@example.com <br>'
</div>'
assert_equal(result, html.html2html_strict)
html = '<br>
html = '<div><br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Hotel &lt;info@example.de&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">An: &nbsp; &nbsp; &nbsp;
&nbsp;</font>'
result = '<span class="js-signatureMarker"></span><br><br>Von: Hotel &lt;info@example.de&gt;
<br>An:'
&nbsp;</font></div>'
result = '<span class="js-signatureMarker"></span><div><br>Von: Hotel &lt;info@example.de&gt;
<br>An:
</div>'
assert_equal(result, html.html2html_strict)
html = '<br class=""><div><blockquote type="cite" class=""><div class="">On 04 Mar 2017, at 14:47, Oliver Ruhm &lt;<a href="mailto:oliver@example.com" class="">oliver@example.com</a>&gt; wrote:</div><br class="Apple-interchange-newline">'
result = '<br><div><span class="js-signatureMarker"></span><blockquote type="cite">
result = '<div><span class="js-signatureMarker"></span><blockquote type="cite">
<div>On 04 Mar 2017, at 14:47, Oliver Ruhm &lt;oliver@example.com&gt; wrote:</div>
<br>
</blockquote></div>'
assert_equal(result, html.html2html_strict)
html = '<br class=""><div><blockquote type="cite" class=""><div class="">some note</div><br class="Apple-interchange-newline">'
result = '<br><div><blockquote type="cite">
result = '<div><blockquote type="cite">
<div>some note</div>
<br>
</blockquote></div>'

View file

@ -197,7 +197,7 @@ Liebe Grüße!
},
{
data: IO.binread('test/fixtures/mail7.box'),
body_md5: 'b435df94abbdd3e2c90928d8b156c4a5',
body_md5: '74cccd6144737f4cc895788d8cd0870e',
params: {
from: 'Eike.Ehringer@example.com',
from_email: 'Eike.Ehringer@example.com',
@ -206,12 +206,11 @@ Liebe Grüße!
content_type: 'text/html',
body: 'Hallo.<br>Jetzt muss ich dir noch kurzfristig absagen für morgen.<br>Lass uns evtl morgen Tel.<br><br>Mfg eike <br><br><div>
<div>Martin Edenhofer via Znuny Team --- Installation [Ticket#11392] --- </div>
<div>
<span class="js-signatureMarker"></span><br><br>
<span class="js-signatureMarker"></span><div><br>
Von: "Martin Edenhofer via Znuny Team" &lt;support@example.com&gt; <br>
An eike.xx@xx-corpxx.com <br>
Datum: Mi., 13.06.2012 14:30 <br>
Betreff Installation [Ticket#11392] <br> <hr style="width:100%;">
Betreff Installation [Ticket#11392] <br> <hr>
<br><pre>Hi Eike,
anbei wie gestern telefonisch besprochen Informationen zur Vorbereitung.
@ -245,7 +244,7 @@ Managing Director: Martin Edenhofer
},
{
data: IO.binread('test/fixtures/mail8.box'),
body_md5: 'fa130a3d6437ddb26f7bba80c8a3fdc8',
body_md5: '630aa1cc84fcaee8a0f232908c454c5f',
attachments: [
{
md5: 'c3ca4aab222eed8a148a716371b70129',
@ -258,7 +257,7 @@ Managing Director: Martin Edenhofer
from_display_name: '',
subject: 'could not rename: ZZZAAuto',
content_type: 'text/html',
body: '<br><img src="cid:_1_08FC9B5808FC7D5C004AD64FC1257A28">
body: '<img src="cid:_1_08FC9B5808FC7D5C004AD64FC1257A28">
<br>
<br>Gravierend?<br>
@ -289,7 +288,7 @@ Geschäftsführung/Management Board: Jan Bauer (Vorsitzender/Chairman), Oliver B
<br>
Sitz der Gesellschaft / Registered Office: Hof
<br>
Registergericht / Commercial Register of the Local Court: HRB 0000 AG Hof <br>',
Registergericht / Commercial Register of the Local Court: HRB 0000 AG Hof',
},
},
{
@ -353,7 +352,7 @@ Registergericht / Commercial Register of the Local Court: HRB 0000 AG Hof <br>',
},
{
data: IO.binread('test/fixtures/mail11.box'),
body_md5: 'cb85100f3c7bef62a56bfd47f4e5f94d',
body_md5: '6a90db640ae9dd677ab6e4b441c58d68',
attachments: [
{
md5: '08660cd33ce8c64b95bcf0207ff6c4d6',
@ -367,18 +366,18 @@ Registergericht / Commercial Register of the Local Court: HRB 0000 AG Hof <br>',
subject: 'Eine schöne Adventszeit für ZNUNY GMBH - ENTERPRISE SERVICES FÜR OTRS',
to: 'enjoy_us@znuny.com',
content_type: 'text/html',
body: '<br> <a href="http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-2/http://web2.cylex.de/advent2012?b2b" rel="nofollow" target="_blank">http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-2/http://web2.cylex.de/advent2012?b2b</a>
body: '<a href="http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-2/http://web2.cylex.de/advent2012?b2b" rel="nofollow" target="_blank">http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-2/http://web2.cylex.de/advent2012?b2b</a>
<p>Lieber CYLEX Eintragsinhaber,</p><p>das Jahr neigt sich dem Ende und die besinnliche Zeit beginnt laut Kalender mit dem<br> 1. Advent. Und wie immer wird es in der vorweihnachtlichen Zeit meist beruflich und privat<br> so richtig schön hektisch.</p><p>Um Ihre Weihnachtsstimmung in Schwung zu bringen kommen wir nun mit unserem Adventskalender ins Spiel. Denn 24 Tage werden Sie unsere netten Geschichten, Rezepte und Gewinnspiele sowie ausgesuchte Geschenktipps und Einkaufsgutscheine online begleiten. Damit lässt sich Ihre Freude auf das Fest garantiert mit jedem Tag steigern.</p><br> Einen gemütlichen Start in die Adventszeit wünscht Ihnen <a href="http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-1/http://web2.cylex.de/advent2012?b2b" rel="nofollow" target="_blank">http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-1/http://web2.cylex.de/advent2012?b2b</a> <br> <p>Ihr CYLEX Team<br>
<br>
<strong>P.S.</strong> Damit Sie keinen Tag versäumen, empfehlen wir Ihnen den Link des Adventkalenders (<a href="http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-3/http://web2.cylex.de/advent2012?b2b" rel="nofollow" target="_blank">http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-3/http://web2.cylex.de/advent2012?b2b</a>) in<br> Ihrer Lesezeichen-Symbolleiste zu ergänzen.</p><p>&nbsp;</p><br> Impressum <br> S.C. CYLEX INTERNATIONAL S.N.C.<br> Sat. Palota 119/A RO 417516 Palota Romania <br> Tel.: +49 208/62957-0 | <br> Geschäftsführer: Francisc Osvald<br> Handelsregister: J05/1591/2009<br> USt.IdNr.: RO26332771 <br>
serviceteam@cylex.de<br>
Homepage (<a href="http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-98/http://web2.cylex.de/homepage/home.asp" rel="nofollow" target="_blank">http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-98/http://web2.cylex.de/homepage/home.asp</a>)<br>
Newsletter abbestellen (<a href="http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-99/http://newsletters.cylex.de/unsubscribe.aspx?uid=4134001&amp;d=www.cylex.de&amp;e=enjoy@znuny.com&amp;sc=3009&amp;l=d" rel="nofollow" target="_blank">http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-99/http://newsletters.cylex.de/unsubscribe.aspx?uid=4134001&amp;d=www.cylex.de&amp;e=enjoy@znuny.com&amp;sc=3009&amp;l=d</a>) <br>',
Newsletter abbestellen (<a href="http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-99/http://newsletters.cylex.de/unsubscribe.aspx?uid=4134001&amp;d=www.cylex.de&amp;e=enjoy@znuny.com&amp;sc=3009&amp;l=d" rel="nofollow" target="_blank">http://newsletters.cylex.de/ref/www.cylex.de/sid-105/uid-4134001/lid-99/http://newsletters.cylex.de/unsubscribe.aspx?uid=4134001&amp;d=www.cylex.de&amp;e=enjoy@znuny.com&amp;sc=3009&amp;l=d</a>)',
},
},
{
data: IO.binread('test/fixtures/mail12.box'),
body_md5: '24d66a30f572c1d742f9c54b3947ba2b',
body_md5: 'eacbca29d25cd10aa0f7e2ca558d38f2',
attachments: [
{
md5: '46cf0f95ea0c8211cbb704e1959b9173',
@ -412,7 +411,6 @@ Newsletter abbestellen (<a href="http://newsletters.cylex.de/ref/www.cylex.de/si
<br> Telefon: (069) 11 1111 11 30</p>
<p>Telefon ServiceDesk: (069) 11 1111 12 22<br> Telefax: (069) 11 1111 14 85<br> Internet: <a href="http://www.example.com/" title="http://www.example.com/" rel="nofollow" target="_blank">www.example.com</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<span class="js-signatureMarker"></span><p>-----Ursprüngliche Nachricht-----<br> Von: Martin Edenhofer via Znuny Sales [mailto:example@znuny.com] <br> Gesendet: Freitag, 30. November 2012 13:50<br> An: Smith, Alex<br> Betreff: Agenda [Ticket#11995]</p>
<p>&nbsp;</p>
<p>Sehr geehrte Frau Smith,</p>
@ -518,7 +516,7 @@ Newsletter abbestellen (<a href="http://newsletters.cylex.de/ref/www.cylex.de/si
# spam email
{
data: IO.binread('test/fixtures/mail16.box'),
body_md5: 'bb2ab89172b556b37b6e2dce6161a54e',
body_md5: 'c5c69b6d388114f4f8d24ea264793a6f',
params: {
from: nil,
from_email: 'vipyimin@126.com',
@ -530,7 +528,7 @@ Newsletter abbestellen (<a href="http://newsletters.cylex.de/ref/www.cylex.de/si
# spam email
{
data: IO.binread('test/fixtures/mail17.box'),
body_md5: 'b8e8e004f57c6a9ed08f72109b53936b',
body_md5: 'd78731371e3ec120896c51be3d0d3f8e',
params: {
from: '"都琹" <ghgbwum@185.com.cn>',
from_email: 'ghgbwum@185.com.cn',
@ -552,7 +550,7 @@ Newsletter abbestellen (<a href="http://newsletters.cylex.de/ref/www.cylex.de/si
},
{
data: IO.binread('test/fixtures/mail19.box'),
body_md5: 'daa6a58d0fb8a3c9fcc313dcff9160ad',
body_md5: '790a98dd429733c7fd8afc6fdd82e2a2',
params: {
from: '"我" <>',
from_email: '"=?GB2312?B?ztI=?=" <>',
@ -577,7 +575,7 @@ Newsletter abbestellen (<a href="http://newsletters.cylex.de/ref/www.cylex.de/si
},
{
data: IO.binread('test/fixtures/mail21.box'),
body_md5: '896ac94b86af896c2ea99dd0c65f804c',
body_md5: 'fe54627416ff0eeae1d507bc2fef2536',
params: {
from: 'Viagra Super Force Online <pharmacy_affordable1@ertelecom.ru>',
from_email: 'pharmacy_affordable1@ertelecom.ru',
@ -650,14 +648,14 @@ end
},
{
data: IO.binread('test/fixtures/mail26.box'),
body_md5: '3987154962319ea14b835be93d1260b3',
body_md5: '869353c72cf4efc83536c577eac14c6f',
params: {
from: 'gate <team@support.gate.de>',
from_email: 'team@support.gate.de',
from_display_name: 'gate',
subject: 'Ihre Rechnung als PDF-Dokument',
to: 'Martin Edenhofer <billing@znuny.inc>',
body: "Ihre Rechnung als PDF-Dokument <br><br>",
body: "Ihre Rechnung als PDF-Dokument",
},
attachments: [
{
@ -712,7 +710,7 @@ end
},
{
data: IO.binread('test/fixtures/mail29.box'),
body_md5: '5545ece414ae1e48e64c9682cd636d75',
body_md5: 'd52e493b8c1132da8cc321d5e47f4fa7',
params: {
from: 'Example Sales <sales@example.com>',
from_email: 'sales@example.com',
@ -721,7 +719,7 @@ end
to: 'info@znuny.inc',
body: 'Dear Mr. Edenhofer, <p>We want to keep you updated on TeamViewer licensing shortages on a regular basis.</p><p><strong>We would like to inform you that since the last message on 25-Nov-2014 there have been temporary session channel exceedances which make it impossible to establish more sessions. Since the last e-mail this has occurred in a total of 1 cases.</strong></p><p>Additional session channels can be added at any time. Please visit ourTeamViewer Online Shop (<a href="https://www.teamviewer.com/en/licensing/update.aspx?channel=d842cs9bf85-p1009645n-348785e76e" rel="nofollow" target="_blank">https://www.teamviewer.com/en/licensing/update.aspx?channel=d842cs9bf85-p1009645n-348785e76e</a>) for pricing information.</p><p>Thank you - and again all the best with TeamViewer!</p><p>Best regards,</p><p><i>Your TeamViewer Team</i></p><p>P.S.: You receive this e-mail because you are listed in our database as person who ordered a TeamViewer license. Please clickhere (<a href="http://www.teamviewer.com/en/company/unsubscribe.aspx?id=1009645&amp;ident=e37682eac65e8ca6ff36074907d8bc14" rel="nofollow" target="_blank">http://www.teamviewer.com/en/company/unsubscribe.aspx?id=1009645&amp;ident=e37682eac65e8ca6ff36074907d8bc14</a>) to unsubscribe from further e-mails.</p>-----------------------------<br>
<a href="http://www.teamviewer.com" rel="nofollow" target="_blank">www.teamviewer.com</a><br>
<br> TeamViewer GmbH * Jahnstr. 30 * 73037 Göppingen * Germany<br> Tel. 07161 60692 50 * Fax 07161 60692 79<br> <br> Registration AG Ulm HRB 534075 * General Manager Holger Felgner<br><br>'
<br> TeamViewer GmbH * Jahnstr. 30 * 73037 Göppingen * Germany<br> Tel. 07161 60692 50 * Fax 07161 60692 79<br> <br> Registration AG Ulm HRB 534075 * General Manager Holger Felgner'
},
},
{
@ -773,7 +771,7 @@ end
},
{
data: IO.binread('test/fixtures/mail36.box'),
body_md5: 'be0ae19251440f2e8164fcf204c1c0e4',
body_md5: '0c03749418faa758ee385a1fc9f01fbc',
params: {
from: 'Martin Smith <m.Smith@example.com>',
from_email: 'm.Smith@example.com',
@ -781,8 +779,7 @@ end
subject: 'Fw: Zugangsdaten',
to: 'Martin Edenhofer <me@example.com>',
body: "<div>
<div>
<br> </div>
<div> </div>
<div>--<br> don't cry - work! (Rainald Goetz)</div>
<div> <div> <div>
<div>
@ -792,8 +789,7 @@ end
<b>Betreff:</b> Fw: Zugangsdaten</div>
<div>
<div>
<div>
<br> </div>
<div> </div>
<div>--<br> don't cry - work! (Rainald Goetz)</div>
<div> <div> <div>
<div>
@ -932,7 +928,7 @@ end
},
{
data: IO.binread('test/fixtures/mail43.box'),
body_md5: '6bb5b8fa67eb5061fa234fcb1e8e58bb',
body_md5: 'df230afc9ce79d364c52969c3b05cd27',
params: {
from: 'Paula <databases.en@example.com>',
from_email: 'databases.en@example.com',
@ -940,13 +936,13 @@ end
subject: 'Kontakte',
to: 'info@example.ch',
cc: nil,
body: '<br><br> <a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=</a> <br><br> <p><i>Geben Sie diese Information an den Direktor oder den für Marketing und Umsatzsteigerung verantwortlichen Mitarbeiter Ihrer Firma weiter!</i></p><br><br> <br> <p>Hallo,</p><ul> <li>Sie suchen nach Möglichkeiten, den Umsatz Ihre Firma zu steigern?</li>
body: '<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=</a> <br><br><p><i>Geben Sie diese Information an den Direktor oder den für Marketing und Umsatzsteigerung verantwortlichen Mitarbeiter Ihrer Firma weiter!</i></p><br><br><p>Hallo,</p><ul> <li>Sie suchen nach Möglichkeiten, den Umsatz Ihre Firma zu steigern?</li>
<li>Sie brauchen neue Geschäftskontakte?</li>
<li>Sie sind es leid, Kontaktdaten manuell zu erfassen?</li>
<li>Ihr Kontaktdatenanbieter ist zu teuer oder Sie sind mit seinen Dienstleistungen unzufrieden?</li>
<li>Sie möchten Ihre Kontaktinformationen gern effizienter auf dem neuesten Stand halten?</li> </ul> <p><br>Bei uns können Sie mit nur wenigen Clicks <b>Geschäftskontakte</b> verschiedener Länder erwerben.</p><p>Dies ist eine<b>schnelle und bequeme</b> Methode, um Daten zu einem vernünftigen Preis zu erhalten.</p><p>Alle Daten werden<b>ständig aktualisiert</b>m so dass Sie sich keine Sorgen machen müssen.</p><p>&nbsp;</p><br><br> <a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0lnnzdxjobgzzzwvsdgetlm10cmvzb2yvy2vtl2xpz25pywlnav9hbc9zog1loxgyotdzzw1hl2vll2xwzwxhehb4q18ubxhzfehsodh8y2m=" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0lnnzdxjobgzzzwvsdgetlm10cmvzb2yvy2vtl2xpz25pywlnav9hbc9zog1loxgyotdzzw1hl2vll2xwzwxhehb4q18ubxhzfehsodh8y2m=</a> <a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=</a> <br><br> <p>XLS-Muster herunterladen
<li>Sie möchten Ihre Kontaktinformationen gern effizienter auf dem neuesten Stand halten?</li> </ul> <p><br>Bei uns können Sie mit nur wenigen Clicks <b>Geschäftskontakte</b> verschiedener Länder erwerben.</p><p>Dies ist eine<b>schnelle und bequeme</b> Methode, um Daten zu einem vernünftigen Preis zu erhalten.</p><p>Alle Daten werden<b>ständig aktualisiert</b>m so dass Sie sich keine Sorgen machen müssen.</p><p>&nbsp;</p><br><a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0lnnzdxjobgzzzwvsdgetlm10cmvzb2yvy2vtl2xpz25pywlnav9hbc9zog1loxgyotdzzw1hl2vll2xwzwxhehb4q18ubxhzfehsodh8y2m=" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0lnnzdxjobgzzzwvsdgetlm10cmvzb2yvy2vtl2xpz25pywlnav9hbc9zog1loxgyotdzzw1hl2vll2xwzwxhehb4q18ubxhzfehsodh8y2m=</a> <a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=</a> <br><br><p>XLS-Muster herunterladen
(<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0lnnzdxjobgzzzwvsdgetlm10cmvzb2yvy2vtl2xpz25pywlnav9hbc9zog1loxgyotdzzw1hl2vll2xwzwxhehb4q18ubxhzfehsodh8y2m=" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0lnnzdxjobgzzzwvsdgetlm10cmvzb2yvy2vtl2xpz25pywlnav9hbc9zog1loxgyotdzzw1hl2vll2xwzwxhehb4q18ubxhzfehsodh8y2m=</a>)</p><p>Datenbank bestellen
(<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=</a>)</p><br> <br> <p><b>Die Anmeldung ist absolut kostenlos und unverbindlich.</b> Sie können die Kataloge gemäß Ihren eigenen Kriterien filtern und ein kostenloses Datenmuster bestellen, sobald Sie sich angemeldet haben.<br> </p><br><br> <br> <p> <b>Wir haben Datenbanken der folgenden Länder:</b> </p><br> <li>Österreich (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nuqwvpmjz8fgex" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nuqwvpmjz8fgex</a>)</li>
(<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=</a>)</p><br> <br> <p><b>Die Anmeldung ist absolut kostenlos und unverbindlich.</b> Sie können die Kataloge gemäß Ihren eigenen Kriterien filtern und ein kostenloses Datenmuster bestellen, sobald Sie sich angemeldet haben.<br> </p><br><br><p> <b>Wir haben Datenbanken der folgenden Länder:</b> </p><br> <li>Österreich (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nuqwvpmjz8fgex" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nuqwvpmjz8fgex</a>)</li>
<li>Belgien (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nfqmvpyzr8fgnh" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nfqmvpyzr8fgnh</a>)</li>
<li>Belarus (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nzqmvpmgj8fdaw" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nzqmvpmgj8fdaw</a>)</li> <li>Schweiz (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3niq2vpyjf8fgy4" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3niq2vpyjf8fgy4</a>)</li>
<li>Tschechische Republik (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3naq2vpmtz8fdc1" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3naq2vpmtz8fdc1</a>)</li>
@ -965,7 +961,7 @@ end
<li>Russland (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nvumvpztv8fgvk" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nvumvpztv8fgvk</a>)</li>
<li>Slowenien (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nju2vpn2r8fgyz" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nju2vpn2r8fgyz</a>)</li>
<li>Slowakei (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nlu2vpnjz8fdq5" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nlu2vpnjz8fdq5</a>)</li>
<li>Ukraine (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nbvwvpytd8fdnh" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nbvwvpytd8fdnh</a>)</li> <br><br> <p>Anwendungsmöglichkeiten für Geschäftskontakte<br> <br> </p><ul> <li>
<li>Ukraine (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nbvwvpytd8fdnh" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxny25plgusdxj0b3nbvwvpytd8fdnh</a>)</li> <br><br><p>Anwendungsmöglichkeiten für Geschäftskontakte<br> <br> </p><ul> <li>
<i>Newsletter senden</i> - Senden von Werbung per E-Mail (besonders effizient).</li>
<li>
<i>Telemarketing</i> - Telefonwerbung.</li>
@ -974,8 +970,7 @@ end
<li>
<i>Gezielte Werbung</i> - Briefpostwerbung.</li>
<li>
<i>Marktforschung</i> - Telefonumfragen zur Erforschung Ihrer Produkte oder Dienstleistungen.</li> </ul> <p>&nbsp;</p><p>Sie können<b>Abschnitte wählen (filtern)</b> Empfänger gemäß Tätigkeitsbereichen und Standort der Firmen, um die Effizienz Ihrer Werbemaßnahmen zu erhöhen.</p><p>&nbsp;</p><br><br> <br> <p>Für jeden Kauf von<b>2016-11-05 23:59:59</b> </p><p>wir gewähren<b>30%</b> Rabatt</p><p><b>RABATTCODE: WZ2124DD</b></p><br><br> <br> <p><b>Bestellen Sie online bei:</b><br> </p><p>company-catalogs.com (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=</a>)<br> </p><p><b>Für weitere Informationen:</b><br> </p><p>E-Mail:databases.en@example.com<br> Telefon: +370-52-071554 (languages: EN, PL, RU, LT)</p><br><br>Unsubscribe from newsletter: Click here (<a href="http://business-catalogs.example.com/c2judxvlcmnic2i4mwk7mtgxotmyns1jmmmtnza=" rel="nofollow" target="_blank">http://business-catalogs.example.com/c2judxvlcmnic2i4mwk7mtgxotmyns1jmmmtnza=</a>)
<br><br>'
<i>Marktforschung</i> - Telefonumfragen zur Erforschung Ihrer Produkte oder Dienstleistungen.</li> </ul> <p>&nbsp;</p><p>Sie können<b>Abschnitte wählen (filtern)</b> Empfänger gemäß Tätigkeitsbereichen und Standort der Firmen, um die Effizienz Ihrer Werbemaßnahmen zu erhöhen.</p><p>&nbsp;</p><br><p>Für jeden Kauf von<b>2016-11-05 23:59:59</b> </p><p>wir gewähren<b>30%</b> Rabatt</p><p><b>RABATTCODE: WZ2124DD</b></p><br><br><p><b>Bestellen Sie online bei:</b><br> </p><p>company-catalogs.com (<a href="http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=" rel="nofollow" target="_blank">http://business-catalogs.example.com/odtpbgs5mwizbjuyyzexlta4yy06mmg7n3avl3r0bmfvy3b0lxlhbw9sc2nhb3nnyy5ll3rpbxjlzi9lbs9ycnjuawfpzxmsdgxnawvplguzzhx4bnxlzwy=</a>)<br> </p><p><b>Für weitere Informationen:</b><br> </p><p>E-Mail:databases.en@example.com<br> Telefon: +370-52-071554 (languages: EN, PL, RU, LT)</p><br><br>Unsubscribe from newsletter: Click here (<a href="http://business-catalogs.example.com/c2judxvlcmnic2i4mwk7mtgxotmyns1jmmmtnza=" rel="nofollow" target="_blank">http://business-catalogs.example.com/c2judxvlcmnic2i4mwk7mtgxotmyns1jmmmtnza=</a>)'
},
},
{

File diff suppressed because one or more lines are too long

View file

@ -73,8 +73,8 @@ tt p://6 6.000146.0x7.147/">XSS</A>', true), 'http://66.000146.0x7.147/ (<a hre
assert_equal(HtmlSanitizer.strict('<a href="[a]java[b]script[c]:alert(1)">XXX</a>'), '<a>XXX</a>')
assert_equal(HtmlSanitizer.strict('<a href="[a]java[b]script[c]:alert(1)">XXX</a>', true), ' (<a href="xxx">XXX</a>)')
assert_equal(HtmlSanitizer.strict('<svg xmlns="http://www.w3.org/2000/svg"><script>alert(1)</script></svg>'), 'alert(1)')
assert_equal(HtmlSanitizer.strict('<a style="position:fixed;top:0;left:0;width: 260px;height:100vh;background-color:red;display: block;" href="http://example.com"></a>'), '<a style="width: 260px;height:100vh;" href="http://example.com" rel="nofollow" target="_blank"></a>')
assert_equal(HtmlSanitizer.strict('<a style="position:fixed;top:0;left:0;width: 260px;height:100vh;background-color:red;display: block;" href="http://example.com"></a>', true), 'http://example.com (<a style="width: 260px;height:100vh;" href="" rel="nofollow" target="_blank"></a>)')
assert_equal(HtmlSanitizer.strict('<a style="position:fixed;top:0;left:0;width: 260px;height:100vh;background-color:red;display: block;" href="http://example.com"></a>'), '<a href="http://example.com" rel="nofollow" target="_blank"></a>')
assert_equal(HtmlSanitizer.strict('<a style="position:fixed;top:0;left:0;width: 260px;height:100vh;background-color:red;display: block;" href="http://example.com"></a>', true), 'http://example.com (<a href="" rel="nofollow" target="_blank"></a>)')
end