| @@ -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) |