X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2FMainWebViewActivity.java;h=e4e68c36957255d62865e3dcfb6087cb34722a6e;hp=534ac52dd2a386af1d9ed935f35e910e461cdd53;hb=701035c727e9a9e70f3edc543cf13c930f7ee06a;hpb=347e702f50a02782add9400afa552fbee1cf7ab6 diff --git a/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java index 534ac52d..e4e68c36 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java @@ -756,8 +756,9 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation } private void loadUrlFromTextBox() throws UnsupportedEncodingException { - // Get the text from urlTextBox and convert it to a string. - String unformattedUrlString = urlTextBox.getText().toString(); + // Get the text from urlTextBox and convert it to a string. trim() removes white spaces from the beginning and end of the string. + String unformattedUrlString = urlTextBox.getText().toString().trim(); + URL unformattedUrl = null; Uri.Builder formattedUri = new Uri.Builder();