Load unspecified URLs as HTTPS by default. https://redmine.stoutner.com/issues/165
[PrivacyBrowser.git] / app / src / main / java / com / stoutner / privacybrowser / activities / MainWebViewActivity.java
index f2a422a27b781649e0ce00618ce62ce1addb8ee9..9bd758959ec4eb41a6c6483284af0c3d641b3931 100644 (file)
@@ -3787,9 +3787,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
 
         // Check to see if `unformattedUrlString` is a valid URL.  Otherwise, convert it into a search.
         if ((Patterns.WEB_URL.matcher(unformattedUrlString).matches()) || (unformattedUrlString.startsWith("http://")) || (unformattedUrlString.startsWith("https://"))) {
-            // Add `http://` at the beginning if it is missing.  Otherwise the app will segfault.
+            // Add `https://` at the beginning if it is missing.  Otherwise the app will segfault.
             if (!unformattedUrlString.startsWith("http")) {
-                unformattedUrlString = "http://" + unformattedUrlString;
+                unformattedUrlString = "https://" + unformattedUrlString;
             }
 
             // Initialize `unformattedUrl`.