- Fix problem with parsing HTML message body with non-unicode characters (#1487813)

pull/1/head
alecpl 13 years ago
parent f21a04c024
commit d61756663c

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix problem with parsing HTML message body with non-unicode characters (#1487813)
- Add option to define matching method for addressbook search (#1486564, #1487907)
- Make email recipients separator configurable
- Fix so folders with \Noinferiors attribute aren't listed in parent selector

@ -639,6 +639,9 @@ function rcmail_wash_html($html, $p = array(), $cid_replaces)
if (!$p['skip_washer_style_callback'])
$washer->add_callback('style', 'rcmail_washtml_callback');
// Remove non-UTF8 characters (#1487813)
$html = rc_utf8_clean($html);
$html = $washer->wash($html);
$REMOTE_OBJECTS = $washer->extlinks;

@ -99,6 +99,17 @@ class rcube_test_mailfunc extends UnitTestCase
$this->assertNoPattern('/font-style:italic/', $washed, "Allow valid styles");
}
/**
* Test washtml class on non-unicode characters (#1487813)
*/
function test_washtml_utf8()
{
$part = $this->get_html_part('src/invalidchars.html');
$washed = rcmail_print_body($part);
$this->assertPattern('/<p>символ<\/p>/', $washed, "Remove non-unicode characters from HTML message body");
}
/**
* Test links pattern replacements in plaintext messages
*/

@ -0,0 +1 @@
<p><EFBFBD>クミシミミイミセミサ</p>
Loading…
Cancel
Save