--- a/includes/functions.php Sun Oct 07 17:22:25 2007 -0400
+++ b/includes/functions.php Tue Oct 09 16:14:55 2007 -0400
@@ -2796,7 +2796,7 @@
$strip_tags = implode('|', $strip_tags);
// Strip out the tags and replace with placeholders
- preg_match_all("#<($strip_tags)(.*?)>(.*?)</($strip_tags)>#is", $html, $matches);
+ preg_match_all("#<($strip_tags)([ ]+.*?)?>(.*?)</($strip_tags)>#is", $html, $matches);
$seed = md5(microtime() . mt_rand()); // Random value used for placeholders
for ($i = 0;$i < sizeof($matches[1]); $i++)
{
@@ -2804,7 +2804,7 @@
}
// Optimize (but don't obfuscate) Javascript
- preg_match_all('/<script(.*?)>(.+?)<\/script>/is', $html, $jscript);
+ preg_match_all('/<script([ ]+.*?)?>(.*?)<\/script>/is', $html, $jscript);
// list of Javascript reserved words - from about.com
$reserved_words = array('abstract', 'as', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'continue', 'const', 'debugger', 'default', 'delete', 'do',
@@ -2819,6 +2819,8 @@
{
$js =& $jscript[2][$i];
+ // echo('<pre>' . "-----------------------------------------------------------------------------\n" . htmlspecialchars($js) . '</pre>');
+
// for line optimization, explode it
$particles = explode("\n", $js);