소스 검색

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 15 년 전
부모
커밋
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 .= ';';
         }