summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts
diff options
context:
space:
mode:
authorwei <>2006-02-22 04:28:21 +0000
committerwei <>2006-02-22 04:28:21 +0000
commitaed2fa6fd84390e9509aebd9c745048594a29c1d (patch)
tree99c294d300930840ab62ec19dfc5ddfbbce15d41 /framework/Web/Javascripts
parent41c5b7e566c0019d0b8e0c9399b780a95ad44113 (diff)
Remove empty string values from javascript encoding
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r--framework/Web/Javascripts/TJavaScript.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/Web/Javascripts/TJavaScript.php b/framework/Web/Javascripts/TJavaScript.php
index 0d081e02..861b973a 100644
--- a/framework/Web/Javascripts/TJavaScript.php
+++ b/framework/Web/Javascripts/TJavaScript.php
@@ -32,7 +32,7 @@ class TJavaScript
{
$str='';
foreach($files as $file)
- $str.='<script type="text/javascript" src="'.THttpUtility::htmlEncode($file)."\"></script>\n";
+ $str.= $this->renderScriptFile($file);
return $str;
}
@@ -125,7 +125,8 @@ class TJavaScript
if($toMap)
{
foreach($value as $k=>$v)
- $results[]="'{$k}':".self::encode($v,$toMap);
+ if(is_string($v) && strlen($v) > 0)
+ $results[]="'{$k}':".self::encode($v,$toMap);
return '{'.implode(',',$results).'}';
}
else