mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Fixed over-zealous removal of returns from text ...
This commit is contained in:
parent
cffbaff2dc
commit
0eae8049a0
@ -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:]#?/&=])",
|
||||
|
Loading…
x
Reference in New Issue
Block a user