From: moodler <moodler>
Date: Sat, 14 Jun 2003 08:41:40 +0000 (+0000)
Subject: Replace script stuff with xxx instead of space to avoid repeating sequences
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=71e8bd81c46858527aa6646d9aa1a7a464f26547;p=moodle.git

Replace script stuff with xxx instead of space to avoid repeating sequences
---

diff --git a/lib/weblib.php b/lib/weblib.php
index 6ad0be9119..07327bd6db 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -511,9 +511,9 @@ function clean_text($text, $format) {
         case FORMAT_HTML:
         case FORMAT_WIKI:
             $text = strip_tags($text, $ALLOWED_TAGS);
-            $text = str_ireplace("javascript:", " ", $text);           // Remove javascript: label
-            $text = eregi_replace("([^a-z])language([[:space:]]*)=", " ", $text);    // Remove javascript/VBScript
-            $text = eregi_replace("([^a-z])on([a-z]+)([[:space:]]*)=", " ", $text);  // Remove script events
+            $text = str_ireplace("javascript:", "xxx", $text);           // Remove javascript: label
+            $text = eregi_replace("([^a-z])language([[:space:]]*)=", "xxx", $text);    // Remove javascript/VBScript
+            $text = eregi_replace("([^a-z])on([a-z]+)([[:space:]]*)=", "xxx", $text);  // Remove script events
             return $text;
 
         case FORMAT_PLAIN: