From 18e2a3efd06b8ffe3b0d27707c6cf650e4ae56a3 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sun, 31 Dec 2006 10:16:09 -0500
Subject: [PATCH] Event handler removing again. Closes #1484200

---
 program/include/main.inc    |    4 ++--
 program/steps/mail/func.inc |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/program/include/main.inc b/program/include/main.inc
index f04636a..d914e3e 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1088,9 +1088,9 @@
  * Quote a given string. Alias function for rep_specialchars_output
  * @see rep_specialchars_output
  */
-function JQ($str, $mode='strict', $newlines=TRUE)
+function JQ($str)
   {
-  return rep_specialchars_output($str, 'js', $mode, $newlines);
+  return rep_specialchars_output($str, 'js');
   }
 
 
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index b8c391a..83f170d 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1214,8 +1214,8 @@
   while ($body != $prev_body)
     {
     $prev_body = $body;
-    $body = preg_replace('/(<[^!][^>]*?\s)(on[^=]+)(=[^>]*?>)/im', '$1__removed=$3', $body);
-    $body = preg_replace('/(<[^!][^>]*?\shref=["\']?)(javascript:)([^>]*?>)/im', '$1null:$3', $body);
+    $body = preg_replace('/(<[^!][^>]*\s)(on[^=>]+)=([^>]+>)/im', '$1__removed=$3', $body);
+    $body = preg_replace('/(<[^!][^>]*\shref=["\']?)(javascript:)([^>]*?>)/im', '$1null:$3', $body);
     }
 
   // resolve <base href>

--
Gitblit v1.9.1