OSDN Git Service

Insert http:// in front of links if needed.
authorRandy Baumgarte <randy@fbn.cx>
Wed, 7 Sep 2011 18:01:58 +0000 (14:01 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Wed, 7 Sep 2011 18:01:58 +0000 (14:01 -0400)
src/cx/fbn/nevernote/dialog/InsertLinkDialog.java

index f5e8a50..d8fdf1e 100644 (file)
@@ -79,7 +79,10 @@ public class InsertLinkDialog extends QDialog {
        \r
        // Get the password \r
        public String getUrl() {\r
-               return urlText;\r
+               if (urlText.indexOf("://") > 0)\r
+                       return urlText;\r
+               else\r
+                       return "http://"+urlText;\r
        }\r
        // Set the url\r
        public void setUrl(String u) {\r