Plugin Directory

Changeset 3202559


Ignore:
Timestamp:
12/04/2024 05:49:28 PM (12 months ago)
Author:
LiteSpeedTech
Message:

Release v6.5.3

Location:
litespeed-cache
Files:
337 added
9 edited

Legend:

Unmodified
Added
Removed
  • litespeed-cache/trunk/litespeed-cache.php

    r3170922 r3202559  
    55 * Plugin URI:        https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
    66 * Description:       High-performance page caching and site optimization from LiteSpeed
    7  * Version:           6.5.2
     7 * Version:           6.5.3
    88 * Author:            LiteSpeed Technologies
    99 * Author URI:        https://www.litespeedtech.com
     
    3535}
    3636
    37 !defined('LSCWP_V') && define('LSCWP_V', '6.5.2');
     37!defined('LSCWP_V') && define('LSCWP_V', '6.5.3');
    3838
    3939!defined('LSCWP_CONTENT_DIR') && define('LSCWP_CONTENT_DIR', WP_CONTENT_DIR);
  • litespeed-cache/trunk/readme.txt

    r3170922 r3202559  
    33Tags: caching, optimize, performance, pagespeed, seo, image optimize, object cache, redis, memcached, database cleaner
    44Requires at least: 4.9
    5 Tested up to: 6.6.1
    6 Stable tag: 6.5.2
     5Tested up to: 6.7
     6Stable tag: 6.5.3
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl.html
     
    255255== Changelog ==
    256256
     257= 6.5.3 - Dec 4 2024 =
     258* **Misc** Quote escaped in attributes when building HTML.
     259
    257260= 6.5.2 - Oct 17 2024 =
    258261* **Crawler** Removed barely used Role Simulator from Crawler, to prevent potential security issues.
  • litespeed-cache/trunk/src/admin-display.cls.php

    r3123399 r3202559  
    279279        }
    280280
    281         return '<script src="' . $src . '" type="text/babel"></script>';
     281        return '<script src="' . Str::trim_quotes($src) . '" type="text/babel"></script>';
    282282    }
    283283
  • litespeed-cache/trunk/src/media.cls.php

    r3157755 r3202559  
    8888        if ($this->_vpi_preload_list) {
    8989            foreach ($this->_vpi_preload_list as $v) {
    90                 $content .= '<link rel="preload" as="image" href="' . $v . '">';
     90                $content .= '<link rel="preload" as="image" href="' . Str::trim_quotes($v) . '">';
    9191            }
    9292        }
     
    760760                        $attrs['height'] = $ori_height;
    761761                        $new_html = preg_replace('#\s+(width|height)=(["\'])[^\2]*?\2#', '', $match[0]);
    762                         $new_html = preg_replace('#<img\s+#i', '<img width="' . $attrs['width'] . '" height="' . $attrs['height'] . '" ', $new_html);
     762                        $new_html = preg_replace('#<img\s+#i', '<img width="' . Str::trim_quotes($attrs['width']) . '" height="' . Str::trim_quotes($attrs['height']) . '" ', $new_html);
    763763                        self::debug('Add missing sizes ' . $attrs['width'] . 'x' . $attrs['height'] . ' to ' . $attrs['src']);
    764764                        $this->content = str_replace($match[0], $new_html, $this->content);
  • litespeed-cache/trunk/src/optimize.cls.php

    r3146657 r3202559  
    334334                            if ($this->cfg_css_async) {
    335335                                $this->html_head .=
    336                                     '<link rel="preload" data-asynced="1" data-optimized="2" as="style" onload="this.onload=null;this.rel=\'stylesheet\'" href="' . $url . '" />'; // todo: How to use " in attr wrapper "
     336                                    '<link rel="preload" data-asynced="1" data-optimized="2" as="style" onload="this.onload=null;this.rel=\'stylesheet\'" href="' . Str::trim_quotes($url) . '" />'; // todo: How to use " in attr wrapper "
    337337                            } else {
    338                                 $this->html_head .= '<link data-optimized="2" rel="stylesheet" href="' . $url . '" />'; // use 2 as combined
     338                                $this->html_head .= '<link data-optimized="2" rel="stylesheet" href="' . Str::trim_quotes($url) . '" />'; // use 2 as combined
    339339                            }
    340340
     
    514514    {
    515515        if ($this->cfg_js_defer === 2 || Utility::str_hit_array($src, $this->cfg_js_delay_inc)) {
    516             return '<script data-optimized="1" type="litespeed/javascript" data-src="' . $src . '"></script>';
     516            return '<script data-optimized="1" type="litespeed/javascript" data-src="' . Str::trim_quotes($src) . '"></script>';
    517517        }
    518518
    519519        if ($this->cfg_js_defer) {
    520             return '<script data-optimized="1" src="' . $src . '" defer></script>';
    521         }
    522 
    523         return '<script data-optimized="1" src="' . $src . '"></script>';
     520            return '<script data-optimized="1" src="' . Str::trim_quotes($src) . '" defer></script>';
     521        }
     522
     523        return '<script data-optimized="1" src="' . Str::trim_quotes($src) . '"></script>';
    524524    }
    525525
     
    602602        }
    603603
    604         $script .= '"' . implode('","', $families) . ($this->_conf_css_font_display ? '&display=swap' : '') . '"';
     604        $script .= '"' . Str::trim_quotes(implode('","', $families)) . ($this->_conf_css_font_display ? '&display=swap' : '') . '"';
    605605
    606606        $script .= ']}};';
     
    714714        foreach ($this->dns_prefetch as $v) {
    715715            if ($v) {
    716                 $this->html_head .= '<link rel="dns-prefetch" href="' . $v . '" />';
     716                $this->html_head .= '<link rel="dns-prefetch" href="' . Str::trim_quotes($v) . '" />';
    717717            }
    718718        }
     
    729729        foreach ($this->dns_preconnect as $v) {
    730730            if ($v) {
    731                 $this->html_head .= '<link rel="preconnect" href="' . $v . '" />';
     731                $this->html_head .= '<link rel="preconnect" href="' . Str::trim_quotes($v) . '" />';
    732732            }
    733733        }
  • litespeed-cache/trunk/src/placeholder.cls.php

    r3157755 r3202559  
    143143                    if ($total_files == 0) {
    144144                        echo '<div class="litespeed-media-lqip"><img src="' .
    145                             File::read($lqip_folder . '/' . $v) .
     145                            Str::trim_quotes(File::read($lqip_folder . '/' . $v)) .
    146146                            '" alt="' .
    147147                            sprintf(__('LQIP image preview for size %s', 'litespeed-cache'), $v) .
     
    149149                    }
    150150
    151                     echo '<div class="litespeed-media-size"><a href="' . File::read($lqip_folder . '/' . $v) . '" target="_blank">' . $v . '</a></div>';
     151                    echo '<div class="litespeed-media-size"><a href="' . Str::trim_quotes(File::read($lqip_folder . '/' . $v)) . '" target="_blank">' . $v . '</a></div>';
    152152
    153153                    $total_files++;
     
    175175        if ($this->_conf_lqip && $this_placeholder != $this->_conf_ph_default) {
    176176            Debug2::debug2('[LQIP] Use resp LQIP [size] ' . $size);
    177             $size = str_replace('"', '', $size);
    178             $additional_attr = ' data-placeholder-resp="' . $size . '"';
     177            $additional_attr = ' data-placeholder-resp="' . Str::trim_quotes($size) . '"';
    179178        }
    180179
    181180        $snippet = defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_NOSCRIPT_RM) ? '' : '<noscript>' . $html . '</noscript>';
    182181        $html = str_replace(array(' src=', ' srcset=', ' sizes='), array(' data-src=', ' data-srcset=', ' data-sizes='), $html);
    183         $html = str_replace('<img ', '<img data-lazyloaded="1"' . $additional_attr . ' src="' . $this_placeholder . '" ', $html);
     182        $html = str_replace('<img ', '<img data-lazyloaded="1"' . $additional_attr . ' src="' . Str::trim_quotes($this_placeholder) . '" ', $html);
    184183        $snippet = $html . $snippet;
    185184
  • litespeed-cache/trunk/src/str.cls.php

    r3170922 r3202559  
    6969        return $str;
    7070    }
     71
     72    /**
     73     * Trim double quotes from a string to be used as a preformatted src in HTML.
     74     * @since 6.5.3
     75     */
     76    public static function trim_quotes($string)
     77    {
     78        return str_replace('"', '', $string);
     79    }
    7180}
  • litespeed-cache/trunk/tpl/inc/metabox.php

    r3009052 r3202559  
    1414            $existing_val = implode(PHP_EOL, $existing_val);
    1515        }
    16         echo '<div style="margin-bottom:10px;"><label for="' . $k . '">' . $v . '</label>';
    17         echo '<textarea style="width:100%" rows="5" id="' . $k . '" name="' . $k . '">' . $existing_val . '</textarea>';
     16        echo '<div style="margin-bottom:10px;"><label for="' . Str::trim_quotes($k) . '">' . $v . '</label>';
     17        echo '<textarea style="width:100%" rows="5" id="' . Str::trim_quotes($k) . '" name="' . Str::trim_quotes($k) . '">' . $existing_val . '</textarea>';
    1818        echo '</div>';
    1919    } else {
    2020        echo '<div style="display:flex;margin-bottom:10px;align-items: center;gap: 2ch;justify-content: space-between;"><label for="' . $k . '">' . $v . '</label>';
    21         echo '<input class="litespeed-tiny-toggle" id="' . $k . '" name="' . $k . '" type="checkbox" value="1" ' . ($existing_val ? 'checked' : '') . ' />';
     21        echo '<input class="litespeed-tiny-toggle" id="' . Str::trim_quotes($k) . '" name="' . Str::trim_quotes($k) . '" type="checkbox" value="1" ' . ($existing_val ? 'checked' : '') . ' />';
    2222        echo '</div>';
    2323    }
  • litespeed-cache/trunk/tpl/toolbox/purge.tpl.php

    r2701447 r3202559  
    156156    <a  class="litespeed-panel postbox"
    157157        href="<?php echo Utility::build_url( $tag, $append_url ) ; ?>"
    158         <?php if ( ! empty( $v[ 'cfm' ] ) ) echo 'data-litespeed-cfm="' . $v[ 'cfm' ] . '"' ; ?>
     158        <?php if ( ! empty( $v[ 'cfm' ] ) ) echo 'data-litespeed-cfm="' . Str::trim_quotes($v[ 'cfm' ]) . '"' ; ?>
    159159    >
    160160        <section class="litespeed-panel-wrapper-icon">
Note: See TracChangeset for help on using the changeset viewer.