alecpl
2011-11-10 d61756663c599121fb1042ffb8b4817d84bde10e
- Fix problem with parsing HTML message body with non-unicode characters (#1487813)


1 files added
3 files modified
16 ■■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/steps/mail/func.inc 3 ●●●●● patch | view | raw | blame | history
tests/mailfunc.php 11 ●●●●● patch | view | raw | blame | history
tests/src/invalidchars.html 1 ●●●● patch | view | raw | blame | history
CHANGELOG
@@ -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
program/steps/mail/func.inc
@@ -639,6 +639,9 @@
  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;
tests/mailfunc.php
@@ -100,6 +100,17 @@
  }
  /**
   * 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
   */
  function test_plaintext()
tests/src/invalidchars.html
New file
@@ -0,0 +1 @@
<p>симÐвол</p>