MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD
This commit is contained in:
@@ -1659,6 +1659,7 @@ function clean_text($text, $format=FORMAT_MOODLE) {
|
||||
/// Fix non standard entity notations
|
||||
$text = preg_replace('/(&#[0-9]+)(;?)/', "\\1;", $text);
|
||||
$text = preg_replace('/(&#x[0-9a-fA-F]+)(;?)/', "\\1;", $text);
|
||||
$text = str_replace(':', ':', $text);
|
||||
|
||||
/// Remove tags that are not allowed
|
||||
$text = strip_tags($text, $ALLOWED_TAGS);
|
||||
|
||||
Reference in New Issue
Block a user