diff --git a/common.inc.php b/common.inc.php index c1265b0..2a3d643 100644 --- a/common.inc.php +++ b/common.inc.php @@ -1274,8 +1274,15 @@ function getTextFromHtml($html) { $text=eregi_replace('',chr(13).chr(10),$text); //and strip the rest of the tags $text=strip_tags($text); - //and replace   + + //a few common html entities + //replace & with & first, so multiply-encoded entities will decode (like "&#160;") + $text=str_replace("&","&",$text); $text=str_replace(" "," ",$text); + $text=str_replace(" "," ",$text); + $text=str_replace("<","<",$text); + $text=str_replace(">",">",$text); + return $text; }