Skip to content

Commit

Permalink
Fix issue with urls that are double url encoded
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed Oct 7, 2022
1 parent 8418b51 commit 7c20bb3
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 7c20bb3

Please sign in to comment.