From 025451ff7dd021c419d167278e02bec642fb3375 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 27 Jun 2007 12:05:05 +0000 Subject: [PATCH] MDL-10276 Text cleaning trouble; backported from HEAD --- lib/weblib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/weblib.php b/lib/weblib.php index 1d7a2207180..584744a9069 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1666,6 +1666,9 @@ function clean_text($text, $format=FORMAT_MOODLE) { /// Clean up embedded scripts and , using kses $text = cleanAttributes($text); + /// Again remove tags that are not allowed + $text = strip_tags($text, $ALLOWED_TAGS); + /// Remove script events $text = eregi_replace("([^a-z])language([[:space:]]*)=", "\\1Xlanguage=", $text); $text = eregi_replace("([^a-z])on([a-z]+)([[:space:]]*)=", "\\1Xon\\2=", $text);