Skip to content

Commit

Permalink
v6.5.1-b1: * **Media** Sanitized dimensions for the images when repla…
Browse files Browse the repository at this point in the history
…cing with placeholders. (TaiYou)
  • Loading branch information
Hai Zheng committed Sep 13, 2024
1 parent e97afc7 commit bc42385
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions litespeed-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: LiteSpeed Cache
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
* Description: High-performance page caching and site optimization from LiteSpeed
* Version: 6.5.0.2
* Version: 6.5.1-b1
* Author: LiteSpeed Technologies
* Author URI: https://www.litespeedtech.com
* License: GPLv3
Expand Down Expand Up @@ -34,7 +34,7 @@
return;
}

!defined('LSCWP_V') && define('LSCWP_V', '6.5.0.2');
!defined('LSCWP_V') && define('LSCWP_V', '6.5.1-b1');

!defined('LSCWP_CONTENT_DIR') && define('LSCWP_CONTENT_DIR', WP_CONTENT_DIR);
!defined('LSCWP_DIR') && define('LSCWP_DIR', __DIR__ . '/'); // Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro

== Changelog ==

= 6.5.1 - Sep 25 2024 =
* **Media** Sanitized dimensions for the images when replacing with placeholders. (TaiYou)

= 6.5.0.2 - Sep 6 2024 =
* **Debug** Compatibility improvement for WP installations w/o `AUTH_KEY` defined in `wp-config.php`.

Expand Down
2 changes: 1 addition & 1 deletion src/media.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ private function _parse_img()

$placeholder = false;
if (!empty($attrs['width']) && $attrs['width'] != 'auto' && !empty($attrs['height']) && $attrs['height'] != 'auto') {
$placeholder = $attrs['width'] . 'x' . $attrs['height'];
$placeholder = intval($attrs['width']) . 'x' . intval($attrs['height']);
}

$src_list[] = $attrs['src'];
Expand Down
1 change: 1 addition & 0 deletions src/placeholder.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public function replace($html, $src, $size)
$additional_attr = '';
if ($this->_conf_lqip && $this_placeholder != $this->_conf_ph_default) {
Debug2::debug2('[LQIP] Use resp LQIP [size] ' . $size);
$size = str_replace('"', '', $size);
$additional_attr = ' data-placeholder-resp="' . $size . '"';
}

Expand Down

0 comments on commit bc42385

Please sign in to comment.