]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed over-zealous removal of returns from text ...
authormartin <martin>
Mon, 2 Sep 2002 07:41:39 +0000 (07:41 +0000)
committermartin <martin>
Mon, 2 Sep 2002 07:41:39 +0000 (07:41 +0000)
lib/weblib.php

index 4f528c7eb5013c568d99b82ea3f84a8abf5ea63a..1f259db3211ea3718ce5948c22e95f8833bd59e9 100644 (file)
@@ -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:]#?/&=])",