Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
MDL-10276 Text cleaning trouble; backported from HEAD
  • Loading branch information
skodak committed Jun 27, 2007
1 parent cafaa20 commit 025451f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/weblib.php
Expand Up @@ -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);
Expand Down

0 comments on commit 025451f

Please sign in to comment.