From: skodak Date: Sat, 29 Jan 2005 13:02:28 +0000 (+0000) Subject: fixed clean_text() SC#76, merged from MOODLE_14_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7789ffbf5ea894059d71bfa7d1e93bbc66eedcd7;p=moodle.git fixed clean_text() SC#76, merged from MOODLE_14_STABLE --- diff --git a/lib/weblib.php b/lib/weblib.php index a30870ea3a..a522d1785c 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1129,13 +1129,13 @@ function clean_text($text, $format=FORMAT_MOODLE) { /// Remove tags that are not allowed $text = strip_tags($text, $ALLOWED_TAGS); + /// Clean up embedded scripts and , using kses + $text = cleanAttributes($text); + /// Remove script events $text = eregi_replace("([^a-z])language([[:space:]]*)=", "\\1Xlanguage=", $text); $text = eregi_replace("([^a-z])on([a-z]+)([[:space:]]*)=", "\\1Xon\\2=", $text); - /// Clean up embedded scripts and , using kses - $text = cleanAttributes($text); - return $text; } }