From c3d7964c593e0bedabea2fea0b35ba243cf9e696 Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Fri, 1 Oct 2021 04:34:10 +0000 Subject: [PATCH] Bug 1582606 - Allow data: url on GVE. r=geckoview-reviewers,agi If data: url has space, it doesn't be recognized as data: url on GVE. Differential Revision: https://phabricator.services.mozilla.com/D127124 --- .../java/org/mozilla/geckoview_example/GeckoViewActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java b/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java index 27bc9bf5261a..fdbaa4c515b7 100644 --- a/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java +++ b/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java @@ -421,7 +421,7 @@ public class GeckoViewActivity private LocationView.CommitListener mCommitListener = new LocationView.CommitListener() { @Override public void onCommit(String text) { - if ((text.contains(".") || text.contains(":")) && !text.contains(" ")) { + if (text.startsWith("data:") || ((text.contains(".") || text.contains(":")) && !text.contains(" "))) { mTabSessionManager.getCurrentSession().loadUri(text); } else { mTabSessionManager.getCurrentSession().loadUri(SEARCH_URI_BASE + text);