Removed $goodStr = str_replace(chr(160), ' ', $goodStr );

as it causes bug 2794 and I can't even see what the point of it was.
This commit is contained in:
moodler
2005-03-27 05:50:21 +00:00
parent c61098fbec
commit fae1077b2a
-2
View File
@@ -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;