diff --git a/application/third_party/htmlcompressor/controllers/index.php b/application/third_party/htmlcompressor/controllers/index.php index f68849d8..b2bbc8bf 100644 --- a/application/third_party/htmlcompressor/controllers/index.php +++ b/application/third_party/htmlcompressor/controllers/index.php @@ -60,8 +60,7 @@ class Index extends CI_Controller { $link_script->outertext = ''; //删除链接,移动到页底 } else { //网页内的js不需要提取 - //$js_content.= $link_script->innertext;//js的内容 - $js_content.= $link_script; + $js_content.= $link_script->innertext;//js的内容 $link_script->outertext = ''; //删除js,移动到页底 } } @@ -90,7 +89,7 @@ class Index extends CI_Controller { //在最后加载原始css文件和js文件 //把css移动到页面底部,延迟加载 - $lastload_js = ''; } - $lastload_js.=$js_content; + $lastload_js.=''; $html_object = str_replace('', $lastload_js . '', $html_object); }