Skip to content

Commit

Permalink
Better regular expression to catch javascript triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Jun 9, 2003
1 parent 14f593e commit f1c9d90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/weblib.php
Expand Up @@ -512,7 +512,7 @@ function clean_text($text, $format) {
case FORMAT_WIKI: case FORMAT_WIKI:
$text = strip_tags($text, $ALLOWED_TAGS); $text = strip_tags($text, $ALLOWED_TAGS);
$text = str_ireplace("javascript:", " ", $text); // Remove javascript: label $text = str_ireplace("javascript:", " ", $text); // Remove javascript: label
$text = eregi_replace("([^a-z])on([a-z]+)=", " ", $text); // Remove javascript triggers $text = eregi_replace("([^a-z])on([a-z]+)([[:space:]]*)=", " ", $text); // Remove javascript triggers
return $text; return $text;


case FORMAT_PLAIN: case FORMAT_PLAIN:
Expand Down

0 comments on commit f1c9d90

Please sign in to comment.