Changeset 1995957
- Timestamp:
- 12/16/2018 07:06:15 PM (7 years ago)
- Location:
- html-minifier/trunk
- Files:
-
- 3 edited
-
html-minifier.php (modified) (2 diffs)
-
inc/src/HTMLMinifier.php (modified) (4 diffs)
-
readme.md (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
html-minifier/trunk/html-minifier.php
r1987784 r1995957 7 7 Plugin URI: http://www.terresquall.com/web/html-minifier/ 8 8 Description: Provides a variety of optimisation options (e.g. minification, caching, code reorganisation) for your site's source code to help meet today's web performance standards. 9 Version: 2.3. 19 Version: 2.3.2 10 10 Dated: 07/12/2018 11 11 Author: Terresquall … … 29 29 require_once HTML_MINIFIER__PLUGIN_DIR . 'inc/HTMLMinifier.manager.php'; 30 30 31 define('HTML_MINIFIER_PLUGIN_VERSION', '2.3. 1');32 define('HTML_MINIFIER_PLUGIN_VERSION_DATE', ' 7 December 2018');31 define('HTML_MINIFIER_PLUGIN_VERSION', '2.3.2'); 32 define('HTML_MINIFIER_PLUGIN_VERSION_DATE', '17 December 2018'); 33 33 34 34 add_action('init',array('HTMLMinifier_Manager','init')); -
html-minifier/trunk/inc/src/HTMLMinifier.php
r1970984 r1995957 9 9 @author Terence Pek <terence@terresquall.com> 10 10 @website www.terresquall.com 11 @version 3.2.1 12 @dated 08/11/2018 13 @notes - Rewrote the remove_comments() function in HTML minifier to make it more efficient. The old function incorrectly identified regexes and strings previously, and was not efficient. 11 @version 3.2.2 12 @dated 17/12/2018 13 @notes - Fixed a critical error with the remove comments functionality in Javascript and CSS that caused some major bugs. 14 - Rewrote the remove_comments() function in HTML minifier to make it more efficient. The old function incorrectly identified regexes and strings previously, and was not efficient. 14 15 - Fixed a bug that caused 'shift_script_tags_to_bottom' to always create script tags at the end of the page. 15 16 - Improved string detection patterns in JS / CSS so that backslashes just before the closing quote or slash won't break the system. … … 37 38 public static $CacheExpiry = 86400; // Time in seconds. 86400 is 1 day. 38 39 39 const VERSION = '3.2. 1';40 const VERSION = '3.2.2'; 40 41 const SIGNATURE = 'Original size: %d bytes, minified: %d bytes. HTMLMinifier: www.terresquall.com/web/html-minifier.'; 41 42 const CACHE_SIG = 'Server cached on %s.'; … … 1059 1060 1060 1061 // Encapsulated content that we want to capture (in regex without delimiters). 1061 $encap_start = array( '"',"(?:(?<!\\\\)|(?<=^|[^\\\\])(\\\\{2})+)'");1062 $encap_end = array( '"',"(?:(?<!\\\\)|(?<=^|[^\\\\])(\\\\{2})+)'");1062 $encap_start = array("'",'"'); 1063 $encap_end = array("(?:(?<!\\\\)|(?<=^|[^\\\\])(\\\\{2})+)'","(?:(?<!\\\\)|(?<=^|[^\\\\])(\\\\{2})+)\""); 1063 1064 if($type === 'css') { 1064 1065 $encap_start[] = '(?:url|image)\\('; 1065 1066 $encap_end[] = '\\)'; 1066 1067 } else { 1067 $encap_start[] = '(?<=^|[[{};:=?(, ]|&&|\\|\\|)\s*/(?![/\\*])';1068 $encap_start[] = '(?<=^|[[{};:=?(,*]|&&|\\|\\|)\s*/(?![/\\*])'; 1068 1069 $encap_end[] = '(?:(?<!\\\\)|(?<=^|[^\\\\])(\\\\{2})+)/[gim]?'; 1069 1070 } … … 1111 1112 trigger_error(sprintf('There is an error in your %s file. An encapsulator like a string or regex was opened and was not closed: %s.',$ftype,substr($source,$offset)),E_USER_ERROR); 1112 1113 } 1113 }1114 1114 1115 } 1115 1116 // Remove all comments inside the source. 1116 1117 foreach($comments_store as $k => $e) $source = self::replace($e,'',$source); -
html-minifier/trunk/readme.md
r1987784 r1995957 4 4 Tags: source minifier, minify, html, javascript, css, optimisation, caching, reorganisation 5 5 Requires at least: 3.6.4 6 Tested up to: 5.0.07 Stable tag: 2.3. 16 Tested up to: 4.9.9 7 Stable tag: 2.3.2 8 8 Requires PHP: 5.4 9 9 License: GPLv2 or later … … 24 24 25 25 == Changelog == 26 27 = 2.3.2 = 28 *Release Date - 17 December 2018* 29 30 * Fixed a major string detectioin bug with the regex behind handling Javascript and CSS comments. This bug caused HTML Minifier to completely fail in minifying some Javascript and CSS files. 31 * Found some issues with the plugin's compatibility with WordPress 5.0 and above, so the Tested Up To tag for this plugin was rolled back to 4.9.9. Apologies to the users who had to find this out the hard way! A proper compatibility patch for WordPress 5.0 will be released soon. 26 32 27 33 = 2.3.1 =
Note: See TracChangeset
for help on using the changeset viewer.