From b4c75c15d26b27c1b6ebe04a8e9fc4d67ac7eac8 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 10 Jan 2020 10:04:35 +1100 Subject: [PATCH] Ensure that we always return a raw urlencoded url for extenal urls to fix Flexmailer tests --- CRM/Utils/System.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); } /** -- 2.25.1