Author: bpoussin Date: 2010-07-22 11:34:23 +0200 (Thu, 22 Jul 2010) New Revision: 98 Url: http://chorem.org/repositories/revision/bow/98 Log: permit to add all protocol in bookmark (file://, ftp://, http://, https://, ...) Modified: trunk/src/main/java/org/chorem/bow/BookmarkActions.java Modified: trunk/src/main/java/org/chorem/bow/BookmarkActions.java =================================================================== --- trunk/src/main/java/org/chorem/bow/BookmarkActions.java 2010-07-22 09:08:32 UTC (rev 97) +++ trunk/src/main/java/org/chorem/bow/BookmarkActions.java 2010-07-22 09:34:23 UTC (rev 98) @@ -171,8 +171,7 @@ public static void addUrlToBookmark(String url, Bookmark bookmark) { if (url != null && !url.isEmpty()) { String link = url.trim(); - // FIXME poussin 20100717 how can add ftp:// in bookmarks ? - if (! (link.startsWith("http://") || link.startsWith("https://"))) { + if (! link.matches("[a-z]+://.+") ) { link = "http://" + link; } bookmark.setLink(link);
participants (1)
-
bpoussin@users.chorem.org