Skip to content
Permalink
Browse files

Make https the default protocol for address bar on Android, too.

  • Loading branch information
Darkspirit committed Nov 10, 2019
1 parent 6804a3f commit c71988e70bece64f83cd055cafa57025a92030c6
Showing with 4 additions and 0 deletions.
  1. +4 −0 support/android/apk/servoapp/src/main/java/org/mozilla/servo/MainActivity.java
@@ -112,6 +112,10 @@ private void loadUrlFromField() {
uri = URLUtil.composeSearchUrl(text, "https://duckduckgo.com/html/?q=%s", "%s");
} else {
uri = URLUtil.guessUrl(text);

if (uri.startsWith("http://") && !text.startsWith("http://")) {
uri = uri.replaceFirst("http://", "https://");
}
}

mServoView.loadUri(Uri.parse(uri));

0 comments on commit c71988e

Please sign in to comment.
You can’t perform that action at this time.