Skip to content

Commit

Permalink
1.2.7
Browse files Browse the repository at this point in the history
SP PageBuilder : no quote in image overlay causing no webp conversion
  • Loading branch information
conseilgouz committed Aug 16, 2024
1 parent 767f7e5 commit 4892b64
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cgwebp.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="4.0" group="system" method="upgrade">
<name>System - CG Webp</name>
<creationDate>2024-08-08</creationDate>
<creationDate>2024-08-16</creationDate>
<author>ConseilGouz</author>
<copyright>Copyright (C) 2024 ConseilGouz. All rights reserved.</copyright>
<license>GNU/GPL</license>
<authorEmail>pascal.leconte@conseilgouz.com</authorEmail>
<authorUrl>https://www.conseilgouz.com</authorUrl>
<version>1.2.6</version>
<version>1.2.7</version>
<description>PLG_SYSTEM_CGWEBP_DESCRIPTION</description>
<namespace path="src">Conseilgouz\Plugin\System\Cgwebp</namespace>
<scriptfile>script.cgwebp.php</scriptfile>
Expand Down
12 changes: 12 additions & 0 deletions plg_system_cgwebp_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
<changelogs>
<changelog>
<element>plg_system_cgwebp</element>
<type>plugin</type>
<group>system</group>
<version>1.2.7</version>
<note>
<item>Update : 16/08/2024</item>
</note>
<fix>
<item>SP PageBuilder : no quote in image overlay causing no webp conversion</item>
</fix>
</changelog>
<changelog>
<element>plg_system_cgwebp</element>
<type>plugin</type>
Expand Down
2 changes: 1 addition & 1 deletion src/Extension/Cgwebp.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private function gowebp($sHtml, $onefilter)
if(count($extensions)) {
$regexPath = str_replace("/", "\/", $onefilter->directory);
$sHtml = preg_replace_callback(
'/' . $regexPath . '\/.*?(' . implode('|', $extensions) . ')(?=[\'"?#])|#joomlaImage.*?(' . implode('|', $extensions) . ').+?(?=\")\b/',
'/' . $regexPath . '\/.*?(' . implode('|', $extensions) . ')(?=[\'"?#\)])|#joomlaImage.*?(' . implode('|', $extensions) . ').+?(?=\")\b/',
function ($match) use ($quality, $stored_time, $excludedArr, &$debugTarget, $regexPath) {
$img = $match[0];
$newImg = $this->imgToWebp($img, $quality, $excludedArr, $stored_time, $regexPath, $match, $debugTarget);
Expand Down

0 comments on commit 4892b64

Please sign in to comment.