PluginProbe
Autoptimize / 1.8.2
Autoptimize v1.8.2
2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 All 107 releases
← All changes | classes/external/php/minify-html.php +7 -7 2.2.21.8.2 View file →
@@ -139,14 +139,14 @@
139 139 // @todo take into account attribute values that span multiple lines.
140 140 $this->_html = preg_replace('/^\\s+|\\s+$/m', '', $this->_html);
141 141
142 142 // remove ws around block/undisplayed elements
143 - $this->_html = preg_replace('/\\s+(<\\/?(?:area|article|aside|base(?:font)?|blockquote|body'
144 - .'|canvas|caption|center|col(?:group)?|dd|dir|div|dl|dt|fieldset|figcaption|figure|footer|form'
145 - .'|frame(?:set)?|h[1-6]|head|header|hgroup|hr|html|legend|li|link|main|map|menu|meta|nav'
146 - .'|ol|opt(?:group|ion)|output|p|param|section|t(?:able|body|head|d|h||r|foot|itle)'
147 - .'|ul|video)\\b[^>]*>)/i', '$1', $this->_html);
148 -
143 + $this->_html = preg_replace('/\\s+(<\\/?(?:area|base(?:font)?|blockquote|body'
144 + .'|caption|center|cite|col(?:group)?|dd|dir|div|dl|dt|fieldset|form'
145 + .'|frame(?:set)?|h[1-6]|head|hr|html|legend|li|link|map|menu|meta'
146 + .'|ol|opt(?:group|ion)|p|param|t(?:able|body|head|d|h||r|foot|itle)'
147 + .'|ul)\\b[^>]*>)/i', '$1', $this->_html);
148 +
149 149 // remove ws outside of all elements
150 150 $this->_html = preg_replace_callback(
151 151 '/>([^<]+)</'
152 152 ,array($this, '_outsideTagCB')
@@ -256,9 +256,9 @@
256 256
257 257 protected function _removeCdata($str)
258 258 {
259 259 return (false !== strpos($str, '<![CDATA['))
260 - ? str_replace(array('/* <![CDATA[ */','/* ]]> */','/*<![CDATA[*/','/*]]>*/','<![CDATA[', ']]>'), '', $str)
260 + ? str_replace(array('<![CDATA[', ']]>'), '', $str)
261 261 : $str;
262 262 }
263 263
264 264 protected function _needsCdata($str)