diff --git a/lib/weblib.php b/lib/weblib.php index 7775512090c..605cb8ed518 100644 --- a/lib/weblib.php +++ b/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: