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:
Josh Sherman 2013-04-17 12:06:53 -04:00
parent 1cd58e2cef
commit 73ae91d629
2 changed files with 2 additions and 2 deletions

View file

@ -104,7 +104,7 @@ class Display_PHP extends Display_Common
$buffer = ob_get_clean();
// 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
echo $buffer;