MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD

This commit is contained in:
skodak
2007-09-23 12:26:27 +00:00
parent 8a3df96e52
commit a9673e7550
+1
View File
@@ -1517,6 +1517,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);