summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-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