Просмотр исходного кода

trim the whitespace instead of preg_replace-ing it. fixes ZF-10604

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23880 44c647ce-9c0f-0410-b52a-842ac1e357ba
robertbasic 14 лет назад
Родитель
Сommit
490c5d37a3
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      library/Zend/Dojo/View/Helper/Dojo/Container.php

+ 1 - 1
library/Zend/Dojo/View/Helper/Dojo/Container.php

@@ -882,7 +882,7 @@ EOJ;
      */
     public function addJavascript($js)
     {
-        $js = preg_replace('/^\s*(.*?)\s*$/s', '$1', $js);
+        $js = trim($js);
         if (!in_array(substr($js, -1), array(';', '}'))) {
             $js .= ';';
         }