diff --git a/CHANGELOG b/CHANGELOG index c6db1004c..2c88e21a2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -18,6 +18,7 @@ CHANGELOG Roundcube Webmail - Fix race-condition in saving user preferences and loading plugin config (#1490431) - Fix so plain text signature field uses monospace font (#1490435) - Fix so links with href == content aren't added to links list on html to text conversion (#1490434) +- Fix handling of non-break spaces in html to text conversion (#1490436) RELEASE 1.1.2 ------------- diff --git a/program/lib/Roundcube/rcube_html2text.php b/program/lib/Roundcube/rcube_html2text.php index 5e12524b6..a2f62880e 100644 --- a/program/lib/Roundcube/rcube_html2text.php +++ b/program/lib/Roundcube/rcube_html2text.php @@ -216,7 +216,7 @@ class rcube_html2text * @see $ent_search */ protected $ent_replace = array( - ' ', // Non-breaking space + "\xC2\xA0", // Non-breaking space '"', // Double quotes "'", // Single quotes '>', diff --git a/tests/Framework/Html2text.php b/tests/Framework/Html2text.php index 2f2459479..be1488295 100644 --- a/tests/Framework/Html2text.php +++ b/tests/Framework/Html2text.php @@ -51,6 +51,11 @@ class rc_html2text extends PHPUnit_Framework_TestCase 'in' => 'test
test', 'out' => "test\ntest", ), + 8 => array( + 'title' => '  handling test', + 'in' => '
eye:   test
tes:   test
', + 'out' => "eye: test\ntes: test", + ), ); }