Plugin Directory

Changeset 2186619


Ignore:
Timestamp:
11/06/2019 02:25:55 AM (6 years ago)
Author:
pcfreak30
Message:

*Version bump to 0.7.1.2

Location:
rocket-async-css/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • rocket-async-css/trunk/README.txt

    r2175464 r2186619  
    5656
    5757== Changelog ==
     58
     59
     60### 0.7.1.2 ###
     61
     62* Bug: Do additional cleanup on font processing to prevent bad syntax
     63* Bug: Don't process AJAX JSON requests
     64* Bug: Exclude ResponsiveImage processing from AMP
     65* Enhancement: Centralize multibyte encoding for entities into the DOMDocument class so that style tags do not get processed
    5866
    5967### 0.7.1.1 ###
  • rocket-async-css/trunk/lib/Rocket/Async/CSS.php

    r2175464 r2186619  
    2020     * Plugin version
    2121     */
    22     const VERSION = '0.7.1.1';
     22    const VERSION = '0.7.1.2';
    2323
    2424    /**
     
    293293        if ( $this->do_process_page( $buffer ) ) {
    294294            // Import HTML
    295             if ( ! @$this->document->loadHTML( mb_convert_encoding( $buffer, 'HTML-ENTITIES', 'UTF-8' ) ) ) {
     295            if ( ! @$this->document->loadHTML( $buffer ) ) {
    296296                return $buffer;
    297297            }
     
    923923                            $new_font_face = trim( trim( $font_face_match[1] ), '{}' ) . ";font-display: {$font_display};";
    924924                        }
    925                         $css = str_replace( $font_face_match[1], "{{$new_font_face}}", $css );
     925
     926                        $new_font_face = trim( trim( $new_font_face ), '{}' );
     927                        $css           = str_replace( $font_face_match[1], "{{$new_font_face}}", $css );
    926928                    }
    927929                }
  • rocket-async-css/trunk/lib/Rocket/Async/CSS/DOMDocument.php

    r2175464 r2186619  
    1717        $source = $this->pre_process_scripts( $source );
    1818        $source = $this->pre_process_styles( $source );
     19        $source = mb_convert_encoding( $source, 'HTML-ENTITIES', 'UTF-8' );
     20
    1921        return @parent::loadHTML( $source, $options );
    2022    }
  • rocket-async-css/trunk/lib/Rocket/Async/CSS/Integration/ResponsiveImages.php

    r2175464 r2186619  
    2727
    2828    public function wp_loaded() {
    29         if ( is_admin() || wp_is_xml_request() || wp_is_json_request() || is_feed() ) {
     29        if ( is_admin() || wp_is_xml_request() || wp_is_json_request() || is_feed() || ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) ) {
    3030            return;
    3131        }
     
    4747
    4848    public function process( $content ) {
     49
     50        if ( wp_doing_ajax() ) {
     51            if ( json_decode( $content ) ) {
     52                return $content;
     53            }
     54        }
     55
    4956        $new_content = $content;
    5057
     
    5663        }
    5764
    58         if ( ! @$this->document->loadHTML( mb_convert_encoding( $new_content, 'HTML-ENTITIES', 'UTF-8' ) ) ) {
     65        if ( ! @$this->document->loadHTML( $new_content ) ) {
    5966            return $content;
    6067        }
     
    201208
    202209            $image_document = new DOMDocument();
    203             $new_image      = mb_convert_encoding( $new_image, 'HTML-ENTITIES', 'UTF-8' );
    204210            @$image_document->loadHTML( "<html><head></head><body>{$new_image}</body></html>" );
    205211            $image->parentNode->replaceChild( $this->document->importNode( $image_document->getElementsByTagName( 'img' )->item( 0 ), true ), $image );
  • rocket-async-css/trunk/lib/Rocket/Async/CSS/Integration/ThePreloader.php

    r2129572 r2186619  
    4646     */
    4747    public function inject_div( $buffer ) {
    48         if ( ! @$this->document->loadHTML( mb_convert_encoding( $buffer, 'HTML-ENTITIES', 'UTF-8' ) ) ) {
     48        if ( ! @$this->document->loadHTML( $buffer ) ) {
    4949            return $buffer;
    5050        }
  • rocket-async-css/trunk/rocket-async-css.php

    r2175464 r2186619  
    1717 * Plugin URI:        https://github.com/pcfreak30/rocket-async-css
    1818 * Description:       WordPress plugin to combine all CSS load async including inline scripts. Extends WP-Rocket
    19  * Version:           0.7.1.1
     19 * Version:           0.7.1.2
    2020 * Author:            Derrick Hammer
    2121 * Author URI:        http://www.derrickhammer.com
Note: See TracChangeset for help on using the changeset viewer.