]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11413 revisited
authorskodak <skodak>
Mon, 24 Sep 2007 15:24:21 +0000 (15:24 +0000)
committerskodak <skodak>
Mon, 24 Sep 2007 15:24:21 +0000 (15:24 +0000)
lib/weblib.php

index 2835866b9cdace23fb87531a9438774baa85c734..5b0b530cd1cb276c07cbdbf15df5f880981e5e57 100644 (file)
@@ -1837,10 +1837,10 @@ 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('&#x03A;', ':', $text);
 
             /// Remove tags that are not allowed
                 $text = strip_tags($text, $ALLOWED_TAGS);
+                $text = str_replace('&#x03A;', ':', $text);
 
             /// Clean up embedded scripts and , using kses
                 $text = cleanAttributes($text);
@@ -1937,7 +1937,7 @@ function cleanAttributes2($htmlArray){
                 $value = kses_decode_entities($value);
                 $value = preg_replace('/(&#[0-9]+)(;?)/', "\\1;", $value);
                 $value = preg_replace('/(&#x[0-9a-fA-F]+)(;?)/', "\\1;", $value);
-                $value = str_replace('&#x03A;', ':', $value);
+                $value = str_replace('&#x03A;', '', $value); //better not have these characters in output at all
                 if ($value === $prevvalue) {
                     $arreach['value'] = $value;
                     break;