From 0352cd2ffa6ef1be5dcb32f174fdc7b6c435fe47 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 25 Sep 2007 14:02:53 +0000 Subject: [PATCH] MDL-11413 I hope now it is correct solution --- lib/kses.php | 2 +- lib/weblib.php | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/kses.php b/lib/kses.php index 0c379d8d55..3c04e6626a 100644 --- a/lib/kses.php +++ b/lib/kses.php @@ -470,7 +470,7 @@ function kses_bad_protocol_once($string, $allowed_protocols) ############################################################################### { return preg_replace('/^((&[^;]*;|[\sA-Za-z0-9])*)'. - '(:|�*58;|&#[Xx]3[Aa];)\s*/e', + '(:|�*58;|&#[Xx]0*3[Aa];)\s*/e', 'kses_bad_protocol_once2("\\1", $allowed_protocols)', $string); } # function kses_bad_protocol_once diff --git a/lib/weblib.php b/lib/weblib.php index f0512e52ec..f879ade193 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1842,7 +1842,6 @@ function clean_text($text, $format=FORMAT_MOODLE) { /// Remove tags that are not allowed $text = strip_tags($text, $ALLOWED_TAGS); - $text = str_replace(':', ':', $text); /// Clean up embedded scripts and , using kses $text = cleanAttributes($text); @@ -1939,7 +1938,6 @@ 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(':', '', $value); //better not have these characters in output at all if ($value === $prevvalue) { $arreach['value'] = $value; break; -- 2.39.5