|
@@ 112-121 (lines=10) @@
|
| 109 |
|
$this->content = $this->hide_noptimize($this->content);
|
| 110 |
|
|
| 111 |
|
// exclude (no)script, as those may contain CSS which should be left as is
|
| 112 |
|
if ( strpos( $this->content, '<script' ) !== false ) {
|
| 113 |
|
$this->content = preg_replace_callback(
|
| 114 |
|
'#<(?:no)?script.*?<\/(?:no)?script>#is',
|
| 115 |
|
create_function(
|
| 116 |
|
'$matches',
|
| 117 |
|
'return "%%SCRIPT".AUTOPTIMIZE_HASH."%%".base64_encode($matches[0])."%%SCRIPT%%";'
|
| 118 |
|
),
|
| 119 |
|
$this->content
|
| 120 |
|
);
|
| 121 |
|
}
|
| 122 |
|
|
| 123 |
|
// Save IE hacks
|
| 124 |
|
$this->content = $this->hide_iehacks($this->content);
|
|
@@ 502-511 (lines=10) @@
|
| 499 |
|
$this->content = $this->restore_comments($this->content);
|
| 500 |
|
|
| 501 |
|
// restore (no)script
|
| 502 |
|
if ( strpos( $this->content, '%%SCRIPT%%' ) !== false ) {
|
| 503 |
|
$this->content = preg_replace_callback(
|
| 504 |
|
'#%%SCRIPT'.AUTOPTIMIZE_HASH.'%%(.*?)%%SCRIPT%%#is',
|
| 505 |
|
create_function(
|
| 506 |
|
'$matches',
|
| 507 |
|
'return base64_decode($matches[1]);'
|
| 508 |
|
),
|
| 509 |
|
$this->content
|
| 510 |
|
);
|
| 511 |
|
}
|
| 512 |
|
|
| 513 |
|
// restore noptimize
|
| 514 |
|
$this->content = $this->restore_noptimize($this->content);
|