From 4ddb73e3fa2d8c55df22b3e04371ce3714ac8a91 Mon Sep 17 00:00:00 2001 From: manuroe Date: Tue, 2 Feb 2021 16:24:32 +0100 Subject: [PATCH] matrix.to: Cannot open links with query parameters #3990 The string can come percent encoded but we parse it with ascii chars ("?", "&", ...). So, remove one layer of encoding to fix the bug. --- CHANGES.rst | 1 + Riot/Modules/Application/LegacyAppDelegate.m | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index befac451d..c81e55ade 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,7 @@ Changes to be released in next version 🐛 Bugfix * Push: Fix PushKit crashes due to undecryptable call invites (#3986). + * matrix.to: Cannot open links with query parameters (#3990). ⚠️ API Changes * diff --git a/Riot/Modules/Application/LegacyAppDelegate.m b/Riot/Modules/Application/LegacyAppDelegate.m index 21bb7c98c..3fb7de7d4 100644 --- a/Riot/Modules/Application/LegacyAppDelegate.m +++ b/Riot/Modules/Application/LegacyAppDelegate.m @@ -1255,6 +1255,10 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni NSLog(@"[AppDelegate] Universal link: handleUniversalLinkFragment: %@", fragment); + // Make sure we have plain utf8 character for separators + fragment = [fragment stringByRemovingPercentEncoding]; + NSLog(@"[AppDelegate] Universal link: handleUniversalLinkFragment: %@", fragment); + // The app manages only one universal link at a time // Discard any pending one [self resetPendingUniversalLink];