Plugin Directory

Changeset 684443


Ignore:
Timestamp:
03/19/2013 10:07:08 PM (13 years ago)
Author:
prometh
Message:

v0.5.5

Location:
wp-html-compression
Files:
9 added
4 edited

Legend:

Unmodified
Added
Removed
  • wp-html-compression/trunk/libs/absolute-to-relative-urls.php

    r677288 r684443  
    11<?php
    22/*
    3 Absolute-to-Relative URLs 0.3.1 <http://www.svachon.com/blog/absolute-to-relative-urls/>
     3Absolute-to-Relative URLs 0.3.2 <http://www.svachon.com/blog/absolute-to-relative-urls/>
    44A class for use in shortening URL links.
    55*/
     
    308308    protected function parse_url($url, $init=false)
    309309    {
    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)
    311316        {
    312317            // Cannot parse scheme-relative URLs with parse_url
     
    469474            if ($url === false)
    470475            {
    471                 // Unknown format
     476                // Unusable format
    472477                return $original_url;
    473478            }
  • wp-html-compression/trunk/libs/html-minify.php

    r677288 r684443  
    11<?php
    22/*
    3 HTML Minify 0.5.4 <http://www.svachon.com/blog/html-minify/>
     3HTML Minify 0.5.5 <http://www.svachon.com/blog/html-minify/>
    44Reduce file size by shortening URLs and safely removing all standard comments and unnecessary white space from an HTML document.
    55*/
     
    7575        $pattern = '/<(?<script>script).*?<\/script\s*>|<(?<style>style).*?<\/style\s*>|<!(?<comment>--).*?-->|<(?<tag>[\/\w.:-]*)(?:".*?"|\'.*?\'|[^\'">]+)*>|(?<text>((<[^!\/\w.:-])?[^<]*)+)|/si';
    7676       
    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        }
    7882       
    7983        $overriding = false;
     
    180184            if ($relate && $this->shorten_urls)
    181185            {
    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);
    183187            }
    184188           
     
    227231
    228232
    229 //ob_start('html_minify_buffer');
     233ob_start('html_minify_buffer');
    230234
    231235
  • wp-html-compression/trunk/readme.txt

    r681799 r684443  
    8181== Changelog ==
    8282
     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
    8389= 0.5.4.2 =
    8490* PHP errors hidden if/when plugin file is accessed directly
  • wp-html-compression/trunk/wp-html-compression.php

    r677326 r684443  
    44Plugin URI: http://www.svachon.com/blog/html-minify/
    55Description: Reduce file size by shortening URLs and safely removing all standard comments and unnecessary whitespace from an HTML document.
    6 Version: 0.5.4.2
     6Version: 0.5.5
    77Author: Steven Vachon
    88Author URI: http://www.svachon.com/
Note: See TracChangeset for help on using the changeset viewer.