Strip HTML comments sans "BuySellAds"
Having an issue getting BSA to validate my site. Attempting to leave those HTML comments in place in an effort to resolve the issue.
This commit is contained in:
parent
1cd58e2cef
commit
73ae91d629
2 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ class Display_PHP extends Display_Common
|
||||||
$buffer = ob_get_clean();
|
$buffer = ob_get_clean();
|
||||||
|
|
||||||
// Kills any whitespace and HTML comments
|
// Kills any whitespace and HTML comments
|
||||||
$buffer = preg_replace(array('/^[\s]+/m', '/<!--.*-->/U'), '', $buffer);
|
$buffer = preg_replace(array('/^[\s]+/m', '/<!--(?:(?!BuySellAds).)+-->/U'), '', $buffer);
|
||||||
|
|
||||||
// Note, this doesn't exit in case you want to run code after the display of the page
|
// Note, this doesn't exit in case you want to run code after the display of the page
|
||||||
echo $buffer;
|
echo $buffer;
|
||||||
|
|
2
jar.php
2
jar.php
|
@ -2834,7 +2834,7 @@ class Display_PHP extends Display_Common
|
||||||
$buffer = ob_get_clean();
|
$buffer = ob_get_clean();
|
||||||
|
|
||||||
// Kills any whitespace and HTML comments
|
// Kills any whitespace and HTML comments
|
||||||
$buffer = preg_replace(array('/^[\s]+/m', '/<!--.*-->/U'), '', $buffer);
|
$buffer = preg_replace(array('/^[\s]+/m', '/<!--(?:(?!BuySellAds).)+-->/U'), '', $buffer);
|
||||||
|
|
||||||
// Note, this doesn't exit in case you want to run code after the display of the page
|
// Note, this doesn't exit in case you want to run code after the display of the page
|
||||||
echo $buffer;
|
echo $buffer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue