Skip to content

Commit

Permalink
Merge pull request #540 from seamuslee001/url_encoded
Browse files Browse the repository at this point in the history
Fix issue with urls that are double url encoded
  • Loading branch information
mattwire authored Oct 8, 2022
2 parents 3781691 + 7c20bb3 commit 3651f9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Mosaico/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ public static function processImg() {
case 'cover':
$func = ($method === 'resize') ? 'createResizedImage' : 'createCoveredImage';

$path_parts = pathinfo(CRM_Utils_String::purifyHTML(CRM_Utils_Request::retrieveValue('src', 'String', NULL, TRUE, 'GET')));
$path_parts = pathinfo(CRM_Utils_String::purifyHTML(urldecode(str_replace('%25', '%', CRM_Utils_Request::retrieveValue('src', 'String', NULL, TRUE, 'GET')))));
$src_file = $config['BASE_DIR'] . $config['UPLOADS_DIR'] . $path_parts["basename"];
$cache_file = $config['BASE_DIR'] . $config['STATIC_DIR'] . $path_parts["basename"];
// $cache_file = $config['BASE_DIR'] . $config['STATIC_DIR'] . $method . '-' . $width . "x" . $height . '-' . $path_parts["basename"];
Expand Down

0 comments on commit 3651f9d

Please sign in to comment.