From: martin Date: Mon, 2 Sep 2002 07:41:39 +0000 (+0000) Subject: Fixed over-zealous removal of returns from text ... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0eae8049a0ce88fed56f7b47ce29d90e84e1c7cd;p=moodle.git Fixed over-zealous removal of returns from text ... --- diff --git a/lib/weblib.php b/lib/weblib.php index 4f528c7eb5..1f259db321 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -269,8 +269,8 @@ function text_to_html($text, $smiley=true, $para=true) { $text = eregi_replace(">([[:space:]]+)<", "><", $text); // Remove any returns that precede or follow HTML tags - $text = eregi_replace("([\n\r])+<", " <", $text); - $text = eregi_replace(">([\n\r])+", "> ", $text); + $text = eregi_replace("([\n\r])<", " <", $text); + $text = eregi_replace(">([\n\r])", "> ", $text); // Make URLs into links. eg http://moodle.com/ $text = eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])",