Plugin Directory

Changeset 1995957


Ignore:
Timestamp:
12/16/2018 07:06:15 PM (7 years ago)
Author:
terresquall
Message:

Commit for v2.3.2.

Location:
html-minifier/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • html-minifier/trunk/html-minifier.php

    r1987784 r1995957  
    77Plugin URI: http://www.terresquall.com/web/html-minifier/
    88Description: 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.1
     9Version: 2.3.2
    1010Dated: 07/12/2018
    1111Author: Terresquall
     
    2929require_once HTML_MINIFIER__PLUGIN_DIR . 'inc/HTMLMinifier.manager.php';
    3030
    31 define('HTML_MINIFIER_PLUGIN_VERSION', '2.3.1');
    32 define('HTML_MINIFIER_PLUGIN_VERSION_DATE', '7 December 2018');
     31define('HTML_MINIFIER_PLUGIN_VERSION', '2.3.2');
     32define('HTML_MINIFIER_PLUGIN_VERSION_DATE', '17 December 2018');
    3333
    3434add_action('init',array('HTMLMinifier_Manager','init'));
  • html-minifier/trunk/inc/src/HTMLMinifier.php

    r1970984 r1995957  
    99@author     Terence Pek <terence@terresquall.com>
    1010@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.
    1415            - Fixed a bug that caused 'shift_script_tags_to_bottom' to always create script tags at the end of the page.
    1516            - Improved string detection patterns in JS / CSS so that backslashes just before the closing quote or slash won't break the system.
     
    3738    public static $CacheExpiry = 86400; // Time in seconds. 86400 is 1 day.
    3839   
    39     const VERSION = '3.2.1';
     40    const VERSION = '3.2.2';
    4041    const SIGNATURE = 'Original size: %d bytes, minified: %d bytes. HTMLMinifier: www.terresquall.com/web/html-minifier.';
    4142    const CACHE_SIG = 'Server cached on %s.';
     
    10591060       
    10601061        // 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})+)\"");
    10631064        if($type === 'css') {
    10641065            $encap_start[] = '(?:url|image)\\(';
    10651066            $encap_end[] = '\\)';
    10661067        } else {
    1067             $encap_start[] = '(?<=^|[[{};:=?(,]|&&|\\|\\|)\s*/(?![/\\*])';
     1068            $encap_start[] = '(?<=^|[[{};:=?(,*]|&&|\\|\\|)\s*/(?![/\\*])';
    10681069            $encap_end[] = '(?:(?<!\\\\)|(?<=^|[^\\\\])(\\\\{2})+)/[gim]?';
    10691070        }
     
    11111112                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);
    11121113            }
    1113         }
    1114        
     1114           
     1115        }
    11151116        // Remove all comments inside the source.
    11161117        foreach($comments_store as $k => $e) $source = self::replace($e,'',$source);
  • html-minifier/trunk/readme.md

    r1987784 r1995957  
    44Tags: source minifier, minify, html, javascript, css, optimisation, caching, reorganisation
    55Requires at least: 3.6.4
    6 Tested up to: 5.0.0
    7 Stable tag: 2.3.1
     6Tested up to: 4.9.9
     7Stable tag: 2.3.2
    88Requires PHP: 5.4
    99License: GPLv2 or later
     
    2424
    2525== 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.
    2632
    2733= 2.3.1 =
Note: See TracChangeset for help on using the changeset viewer.