From c1937cccd0985e86e247287faa9ac60870feecd7 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 27 Aug 2006 23:26:55 +0000 Subject: Merge from 3.0 branch till 1350. --- 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 0f6414ec..e48de8f4 100644 --- a/framework/Web/Javascripts/TJavaScript.php +++ b/framework/Web/Javascripts/TJavaScript.php @@ -89,7 +89,7 @@ class TJavaScript else return strtr($js,array("\t"=>'\t',"\n"=>'\n',"\r"=>'\r','"'=>'\"','\''=>'\\\'','\\'=>'\\\\')); } - + /** * @return string considers the string as raw javascript function code */ @@ -98,16 +98,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); } /** @@ -124,9 +124,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