Skip to content

Commit

Permalink
Fixed over-zealous removal of returns from text ...
Browse files Browse the repository at this point in the history
  • Loading branch information
martin committed Sep 2, 2002
1 parent cffbaff commit 0eae804
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/weblib.php
Expand Up @@ -269,8 +269,8 @@ function text_to_html($text, $smiley=true, $para=true) {
$text = eregi_replace(">([[:space:]]+)<", "><", $text); $text = eregi_replace(">([[:space:]]+)<", "><", $text);


// Remove any returns that precede or follow HTML tags // 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/ // Make URLs into links. eg http://moodle.com/
$text = eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", $text = eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])",
Expand Down

0 comments on commit 0eae804

Please sign in to comment.