Created
April 26, 2015 17:39
-
-
Save MarcosBL/b103895dd5e4478f70ee to your computer and use it in GitHub Desktop.
Maximum Compress HTML using weird tricks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $to_cache = str_replace(array("</option>","</td>","</tr>","</th>","</dt>","</dd>","</li>","</body>","</html>"),"",$to_cache); | |
| $to_cache = preg_replace('/(href|src|id|class|name|type|rel|sizes|lang|title|itemtype|itemprop)=(\"|\')([^\"\'\`=<>\s]+)(\"|\')/i', '$1=$3', $to_cache); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment