includes/functions.php
changeset 184 d74ff822acc9
parent 183 91127e62f38f
child 187 9dbbec5e6096
child 191 3dbe848431b0
equal deleted inserted replaced
183:91127e62f38f 184:d74ff822acc9
  2802   {
  2802   {
  2803     $html = str_replace($matches[0][$i], "{DONT_STRIP_ME_NAKED:$seed:$i}", $html);
  2803     $html = str_replace($matches[0][$i], "{DONT_STRIP_ME_NAKED:$seed:$i}", $html);
  2804   }
  2804   }
  2805   
  2805   
  2806   // Optimize (but don't obfuscate) Javascript
  2806   // Optimize (but don't obfuscate) Javascript
  2807   preg_match_all('/<script([ ]+.*?)?>(.*?)<\/script>/is', $html, $jscript);
  2807   preg_match_all('/<script([ ]+.*?)?>(.*?)(\]\]>)?<\/script>/is', $html, $jscript);
  2808   
  2808   
  2809   // list of Javascript reserved words - from about.com
  2809   // list of Javascript reserved words - from about.com
  2810   $reserved_words = array('abstract', 'as', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'continue', 'const', 'debugger', 'default', 'delete', 'do',
  2810   $reserved_words = array('abstract', 'as', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'continue', 'const', 'debugger', 'default', 'delete', 'do',
  2811                           'double', 'else', 'enum', 'export', 'extends', 'false', 'final', 'finally', 'float', 'for', 'function', 'goto', 'if', 'implements', 'import',
  2811                           'double', 'else', 'enum', 'export', 'extends', 'false', 'final', 'finally', 'float', 'for', 'function', 'goto', 'if', 'implements', 'import',
  2812                           'in', 'instanceof', 'int', 'interface', 'is', 'long', 'namespace', 'native', 'new', 'null', 'package', 'private', 'protected', 'public',
  2812                           'in', 'instanceof', 'int', 'interface', 'is', 'long', 'namespace', 'native', 'new', 'null', 'package', 'private', 'protected', 'public',