diff --git a/AndroidManifest.xml b/AndroidManifest.xml index ccd73bb..cbe7664 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -43,6 +43,7 @@ + @@ -69,6 +70,12 @@ + + + + + + diff --git a/src/org/tint/utils/UrlUtils.java b/src/org/tint/utils/UrlUtils.java index 84d5a47..9e531e4 100644 --- a/src/org/tint/utils/UrlUtils.java +++ b/src/org/tint/utils/UrlUtils.java @@ -34,7 +34,11 @@ public class UrlUtils { */ public static boolean isUrl(String url) { return - url.contains(".") || + (url.contains(".") && !url.contains(" ")) || /* actually check if it begins with the proper protocol */ + url.startsWith("http://") || + url.startsWith("https://") || + url.startsWith("file://") || + url.startsWith("javascript:") || url.equals(Constants.URL_ABOUT_BLANK) || url.equals(Constants.URL_ABOUT_START) || url.equals(Constants.URL_ABOUT_TUTORIAL); @@ -76,6 +80,7 @@ public static String checkUrl(String url) { if ((!url.startsWith("http://")) && (!url.startsWith("https://")) && (!url.startsWith("file://")) && + (!url.startsWith("javascript:")) && //add bookmarklet support (!url.startsWith(Constants.URL_ABOUT_BLANK)) && (!url.startsWith(Constants.URL_ABOUT_START)) && (!url.startsWith(Constants.URL_ABOUT_TUTORIAL))) {