From 2c63478f47d35aa5419b32656cffc389a02bff2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 26 Aug 2019 15:20:51 +0200 Subject: [PATCH] MOBILE-3068 core: Decode URL params on links handlers --- src/addon/mod/wiki/providers/edit-link-handler.ts | 2 +- src/providers/utils/url.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/addon/mod/wiki/providers/edit-link-handler.ts b/src/addon/mod/wiki/providers/edit-link-handler.ts index 5c74cb4d7..512c8c65f 100644 --- a/src/addon/mod/wiki/providers/edit-link-handler.ts +++ b/src/addon/mod/wiki/providers/edit-link-handler.ts @@ -50,7 +50,7 @@ export class AddonModWikiEditLinkHandler extends CoreContentLinksHandlerBase { let section = ''; if (typeof params.section != 'undefined') { - section = this.textUtils.decodeURIComponent(params.section.replace(/\+/g, ' ')); + section = params.section.replace(/\+/g, ' '); } const pageParams = { diff --git a/src/providers/utils/url.ts b/src/providers/utils/url.ts index 70bd15d55..a7b47de34 100644 --- a/src/providers/utils/url.ts +++ b/src/providers/utils/url.ts @@ -79,7 +79,7 @@ export class CoreUrlUtilsProvider { } urlAndHash[0].replace(regex, (match: string, key: string, value: string): string => { - params[key] = typeof value != 'undefined' ? value : ''; + params[key] = typeof value != 'undefined' ? this.textUtils.decodeURIComponent(value) : ''; if (subParams) { params[key] = params[key].replace(subParamsPlaceholder, subParams);