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
This commit is contained in:
Makoto Kato 2021-10-01 04:34:10 +00:00
Родитель cf3b35f68e
Коммит c3d7964c59
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -421,7 +421,7 @@ public class GeckoViewActivity
private LocationView.CommitListener mCommitListener = new LocationView.CommitListener() { private LocationView.CommitListener mCommitListener = new LocationView.CommitListener() {
@Override @Override
public void onCommit(String text) { 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); mTabSessionManager.getCurrentSession().loadUri(text);
} else { } else {
mTabSessionManager.getCurrentSession().loadUri(SEARCH_URI_BASE + text); mTabSessionManager.getCurrentSession().loadUri(SEARCH_URI_BASE + text);