Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed over-zealous removal of returns from text ...

  • Loading branch information...
commit 0eae8049a0ce88fed56f7b47ce29d90e84e1c7cd 1 parent cffbaff
authored September 02, 2002

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  lib/weblib.php
4  lib/weblib.php
@@ -269,8 +269,8 @@ function text_to_html($text, $smiley=true, $para=true) {
269 269
     $text = eregi_replace(">([[:space:]]+)<", "><", $text);
270 270
 
271 271
     // Remove any returns that precede or follow HTML tags
272  
-    $text = eregi_replace("([\n\r])+<", " <", $text);
273  
-    $text = eregi_replace(">([\n\r])+", "> ", $text);
  272
+    $text = eregi_replace("([\n\r])<", " <", $text);
  273
+    $text = eregi_replace(">([\n\r])", "> ", $text);
274 274
 
275 275
     // Make URLs into links.   eg http://moodle.com/
276 276
     $text = eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", 

0 notes on commit 0eae804

Please sign in to comment.
Something went wrong with that request. Please try again.