From: Seamus Lee Date: Thu, 9 Jan 2020 23:04:35 +0000 (+1100) Subject: Ensure that we always return a raw urlencoded url for extenal urls to fix Flexmailer... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b4c75c15d26b27c1b6ebe04a8e9fc4d67ac7eac8;p=civicrm-core.git Ensure that we always return a raw urlencoded url for extenal urls to fix Flexmailer tests --- diff --git a/CRM/Utils/System.php b/CRM/Utils/System.php index 1dcf1227ec..6b33f5b855 100644 --- a/CRM/Utils/System.php +++ b/CRM/Utils/System.php @@ -298,6 +298,8 @@ class CRM_Utils_System { * URI-scheme such as 'http:'). * @param bool $isSSL * NULL to autodetect. TRUE to force to SSL. + * + * @return string rawencoded URL. */ public static function externUrl($path = NULL, $query = NULL, $fragment = NULL, $absolute = TRUE, $isSSL = NULL) { $query = self::makeQueryString($query); @@ -316,7 +318,7 @@ class CRM_Utils_System { 'isSSL' => $isSSL, ]); Civi::service('dispatcher')->dispatch('hook_civicrm_alterExternUrl', $event); - return CRM_Utils_Url::unparseUrl($event->url); + return urldecode(CRM_Utils_Url::unparseUrl($event->url)); } /**