Changeset 684443
- Timestamp:
- 03/19/2013 10:07:08 PM (13 years ago)
- Location:
- wp-html-compression
- Files:
-
- 9 added
- 4 edited
-
tags/0.5.5 (added)
-
tags/0.5.5/libs (added)
-
tags/0.5.5/libs/absolute-to-relative-urls.php (added)
-
tags/0.5.5/libs/html-minify.php (added)
-
tags/0.5.5/readme.txt (added)
-
tags/0.5.5/screenshot-1.png (added)
-
tags/0.5.5/screenshot-2.png (added)
-
tags/0.5.5/screenshot-3.png (added)
-
tags/0.5.5/wp-html-compression.php (added)
-
trunk/libs/absolute-to-relative-urls.php (modified) (3 diffs)
-
trunk/libs/html-minify.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/wp-html-compression.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-html-compression/trunk/libs/absolute-to-relative-urls.php
r677288 r684443 1 1 <?php 2 2 /* 3 Absolute-to-Relative URLs 0.3. 1<http://www.svachon.com/blog/absolute-to-relative-urls/>3 Absolute-to-Relative URLs 0.3.2 <http://www.svachon.com/blog/absolute-to-relative-urls/> 4 4 A class for use in shortening URL links. 5 5 */ … … 308 308 protected function parse_url($url, $init=false) 309 309 { 310 if (strpos($url, '//') === 0) 310 if (strpos($url, 'data:') === 0) 311 { 312 // Nothing can be done with a data URI 313 return false; 314 } 315 else if (strpos($url, '//') === 0) 311 316 { 312 317 // Cannot parse scheme-relative URLs with parse_url … … 469 474 if ($url === false) 470 475 { 471 // Un knownformat476 // Unusable format 472 477 return $original_url; 473 478 } -
wp-html-compression/trunk/libs/html-minify.php
r677288 r684443 1 1 <?php 2 2 /* 3 HTML Minify 0.5. 4<http://www.svachon.com/blog/html-minify/>3 HTML Minify 0.5.5 <http://www.svachon.com/blog/html-minify/> 4 4 Reduce file size by shortening URLs and safely removing all standard comments and unnecessary white space from an HTML document. 5 5 */ … … 75 75 $pattern = '/<(?<script>script).*?<\/script\s*>|<(?<style>style).*?<\/style\s*>|<!(?<comment>--).*?-->|<(?<tag>[\/\w.:-]*)(?:".*?"|\'.*?\'|[^\'">]+)*>|(?<text>((<[^!\/\w.:-])?[^<]*)+)|/si'; 76 76 77 preg_match_all($pattern, $html, $matches, PREG_SET_ORDER); 77 if (preg_match_all($pattern, $html, $matches, PREG_SET_ORDER) === false) 78 { 79 // Invalid markup 80 return $html; 81 } 78 82 79 83 $overriding = false; … … 180 184 if ($relate && $this->shorten_urls) 181 185 { 182 $content = preg_replace_callback('/(action| href|src)=(?:"([^"]*)"|\'([^\']*)\')/i', array(&$this,'callback_HTML_URLs'), $content);186 $content = preg_replace_callback('/(action|data|href|src)=(?:"([^"]*)"|\'([^\']*)\')/i', array(&$this,'callback_HTML_URLs'), $content); 183 187 } 184 188 … … 227 231 228 232 229 //ob_start('html_minify_buffer');233 ob_start('html_minify_buffer'); 230 234 231 235 -
wp-html-compression/trunk/readme.txt
r681799 r684443 81 81 == Changelog == 82 82 83 = 0.5.5 = 84 * Upgraded to **[Absolute-to-Relative URLs](http://wordpress.org/extend/plugins/absolute-to-relative-urls/)** v0.3.2 85 * Data URIs are no longer invalidated by the URL shortener 86 * URL shortener now applied to `data` attribute values (common to `<object>`) 87 * Original, unaltered markup is served if found to be invalid 88 83 89 = 0.5.4.2 = 84 90 * PHP errors hidden if/when plugin file is accessed directly -
wp-html-compression/trunk/wp-html-compression.php
r677326 r684443 4 4 Plugin URI: http://www.svachon.com/blog/html-minify/ 5 5 Description: Reduce file size by shortening URLs and safely removing all standard comments and unnecessary whitespace from an HTML document. 6 Version: 0.5. 4.26 Version: 0.5.5 7 7 Author: Steven Vachon 8 8 Author URI: http://www.svachon.com/
Note: See TracChangeset
for help on using the changeset viewer.