Bug 1297117 - WIP: Decode original URL when parsing about:reader URL draft
authorAndrzej Hunt <ahunt@mozilla.com>
Fri, 02 Sep 2016 12:39:02 -0700
changeset 409424 3da63d9f85c496f3633161229f61cfc99efca06b
parent 409423 b128f77a73739c109d54beeafc1b6ab25c272687
child 530332 5751dfc9d743ce8c3f525c6793d467884bdd8bb7
push id28461
push userahunt@mozilla.com
push dateFri, 02 Sep 2016 19:39:30 +0000
bugs1297117
milestone51.0a1
Bug 1297117 - WIP: Decode original URL when parsing about:reader URL This doesn't seem to have any immediate adverse effects, but I still need to learn about what differences this might cause in other parts of the code (favicon handling? bookamrking?). MozReview-Commit-ID: EmOXnzS6TBP
mobile/android/base/java/org/mozilla/gecko/reader/ReaderModeUtils.java
--- a/mobile/android/base/java/org/mozilla/gecko/reader/ReaderModeUtils.java
+++ b/mobile/android/base/java/org/mozilla/gecko/reader/ReaderModeUtils.java
@@ -52,17 +52,17 @@ public class ReaderModeUtils {
      * 2. the input URL is an invalid/unparseable about:reader URL
      */
     public static String stripAboutReaderUrl(String url) {
         if (!AboutPages.isAboutReader(url)) {
             return url;
         }
 
         final String strippedUrl = getUrlFromAboutReader(url);
-        return strippedUrl != null ? strippedUrl : url;
+        return strippedUrl != null ? Uri.decode(strippedUrl) : url;
     }
 
     public static String getAboutReaderForUrl(String url, int tabId) {
         String aboutReaderUrl = AboutPages.READER + "?url=" + Uri.encode(url);
 
         if (tabId >= 0) {
             aboutReaderUrl += "&tabId=" + tabId;
         }