Better regular expression to catch javascript triggers
This commit is contained in:
+1
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user