Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 39d9e2f

Browse files
authored
URLs with uppercase letters trigger a search (#2735)
1 parent 9bab9b9 commit 39d9e2f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/src/common/shared/org/mozilla/vrbrowser/ui/views/NavigationURLBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public void handleURLEdit(String text) {
372372
GleanMetricsService.urlBarEvent(false);
373373
}
374374

375-
if (mSession.getCurrentUri() != url) {
375+
if (!mSession.getCurrentUri().equals(url)) {
376376
mSession.loadUri(url);
377377

378378
if (mDelegate != null) {

app/src/common/shared/org/mozilla/vrbrowser/utils/UrlUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static String stripProtocol(@Nullable String host) {
6868
return result;
6969
}
7070

71-
private static Pattern domainPattern = Pattern.compile("^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)?[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$");
71+
private static Pattern domainPattern = Pattern.compile("^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)?[a-zA-Z0-9]+([\\-\\.]{1}[a-zA-Z0-9]+)*\\.[a-zA-Z]{2,5}(:[0-9]{1,5})?(\\/.*)?$");
7272
public static boolean isDomain(String text) {
7373
return domainPattern.matcher(text).find();
7474
}

0 commit comments

Comments
 (0)