Skip to content
Permalink
Browse files

Better regular expression to catch javascript triggers

  • Loading branch information...
moodler
moodler committed Jun 9, 2003
1 parent 14f593e commit f1c9d90fbb12100f0ce18bb57cfefb8c1a1f845b
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/weblib.php
@@ -512,7 +512,7 @@ function clean_text($text, $format) {
case FORMAT_WIKI:
$text = strip_tags($text, $ALLOWED_TAGS);
$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;
case FORMAT_PLAIN:

0 comments on commit f1c9d90

Please sign in to comment.
You can’t perform that action at this time.