Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (7)

View Page History
// replace SCRIPTs (and minify) with placeholders
$html = preg_replace_callback(
'/(\\s*)(<script\\b[Zend_Filter_Minify_Html - Nick Daugherty^>]*?>)([\\s\\S]*?)<\\/script>(\\s*)/i'
,array($this, '_removeScriptCB')
,$html);
// replace STYLEs (and minify) with placeholders
$html = preg_replace_callback(
'/\\s*(<style\\b[Zend_Filter_Minify_Html - Nick Daugherty^>]*?>)([\\s\\S]*?)<\\/style>\\s*/i'
,array($this, '_removeStyleCB')
,$html);

// replace PREs with placeholders
$html = preg_replace_callback('/\\s*(<pre\\b[Zend_Filter_Minify_Html - Nick Daugherty^>]*?>[\\s\\S]*?<\\/pre>)\\s*/i'
,array($this, '_removePreCB')
,$html);
// replace TEXTAREAs with placeholders
$html = preg_replace_callback(
'/\\s*(<textarea\\b[Zend_Filter_Minify_Html - Nick Daugherty^>]*?>[\\s\\S]*?<\\/textarea>)\\s*/i'
,array($this, '_removeTextareaCB')
,$html);
.'|frame(?:set)?|h[1-6]|head|hr|html|legend|li|link|map|menu|meta'
.'|ol|opt(?:group|ion)|p|param|t(?:able|body|head|d|h||r|foot|itle)'
.'|ul)\\b[Zend_Filter_Minify_Html - Nick Daugherty^>]*>)/i', '$1', $html);

// remove ws outside of all elements
$html = preg_replace_callback(
'/>([Zend_Filter_Minify_Html - Nick Daugherty^<]+)</'
,array($this, '_outsideTagCB')
,$html);

// use newlines before 1st attribute in open tags (to limit line lengths)
$html = preg_replace('/(<[a-z\\-]+)\\s+([Zend_Filter_Minify_Html - Nick Daugherty^>]+>)/i', "$1\n$2", $html);

// fill placeholders