From fae1077b2ae80ac3a47d0d1470b1fa8b7bd3bc98 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 27 Mar 2005 05:50:21 +0000 Subject: [PATCH] Removed $goodStr = str_replace(chr(160), ' ', $goodStr ); as it causes bug 2794 and I can't even see what the point of it was. --- lib/html2text.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/html2text.php b/lib/html2text.php index 14f13ec93ef..13181bdf96d 100644 --- a/lib/html2text.php +++ b/lib/html2text.php @@ -157,12 +157,10 @@ function html2text( $badStr ) { $goodStr = wordwrap( $goodStr, 78 ); //make sure there are no more than 3 linebreaks in a row and trim whitespace - $goodStr = str_replace(chr(160), ' ', $goodStr ); $goodStr = preg_replace("/\r\n?|\f/", "\n", $goodStr); $goodStr = preg_replace("/\n(\s*\n){2}/", "\n\n\n", $goodStr); $goodStr = preg_replace("/[ \t]+(\n|$)/", "$1", $goodStr); $goodStr = preg_replace("/^\n*|\n*$/", '', $goodStr); - $goodStr = str_replace(chr(160), ' ', $goodStr ); return $goodStr;