From 5a47e8d5c472bfbe07abb464cdcc5bbc721f8d59 Mon Sep 17 00:00:00 2001
From: wei <>
Date: Sat, 26 Aug 2006 12:27:37 +0000
Subject: MINOR BC BREAK (javascript related). Update javascript effect library
to 1.6.2, unify javascript event handler function signatures.
---
framework/Web/Javascripts/TJavaScript.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
(limited to 'framework/Web/Javascripts/TJavaScript.php')
diff --git a/framework/Web/Javascripts/TJavaScript.php b/framework/Web/Javascripts/TJavaScript.php
index 75fc2438..aa5b88de 100644
--- a/framework/Web/Javascripts/TJavaScript.php
+++ b/framework/Web/Javascripts/TJavaScript.php
@@ -84,7 +84,7 @@ class TJavaScript
else
return strtr($js,array("\t"=>'\t',"\n"=>'\n',"\r"=>'\r','"'=>'\"','\''=>'\\\'','\\'=>'\\\\'));
}
-
+
/**
* @return string considers the string as raw javascript function code
*/
@@ -93,16 +93,16 @@ class TJavaScript
if(self::isFunction($js))
return $js;
else
- return 'javascript:'.$js;
+ return 'javascript:'.$js;
}
-
+
/**
* @return boolean true if string is raw javascript function code, i.e., if
* the string begins with javascript:
*/
public static function isFunction($js)
{
- return preg_match('/^\s*javascript:/', $js);
+ return preg_match('/^\s*javascript:/i', $js);
}
/**
@@ -119,9 +119,9 @@ class TJavaScript
*
* For higher complexity data structures use {@link jsonEncode} and {@link jsonDecode}
* to serialize and unserialize.
- *
+ *
* Note: strings begining with javascript: will be considered as
- * raw javascript code and no encoding of that string will be enforced.
+ * raw javascript code and no encoding of that string will be enforced.
*
* @param mixed PHP variable to be encoded
* @param boolean whether the output is a map or a list.
--
cgit v1.2.3