summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/TJavaScript.php
diff options
context:
space:
mode:
authorxue <>2006-08-27 23:26:55 +0000
committerxue <>2006-08-27 23:26:55 +0000
commitc1937cccd0985e86e247287faa9ac60870feecd7 (patch)
tree95ec7083c7be815184c74cd8aa27d02a69d2ea77 /framework/Web/Javascripts/TJavaScript.php
parent887da1b3668499821f046665b461aeadb0a9fb2e (diff)
Merge from 3.0 branch till 1350.
Diffstat (limited to 'framework/Web/Javascripts/TJavaScript.php')
-rw-r--r--framework/Web/Javascripts/TJavaScript.php12
1 files changed, 6 insertions, 6 deletions
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 <tt>javascript:</tt>
*/
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 <tt>javascript:</tt> 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.