Author: toad
Date: 2007-11-19 23:21:39 +0000 (Mon, 19 Nov 2007)
New Revision: 15868

Modified:
   trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java
Log:
this is what nextgens originally meant

Modified: trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java        
2007-11-19 23:16:54 UTC (rev 15867)
+++ trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java        
2007-11-19 23:21:39 UTC (rev 15868)
@@ -89,7 +89,7 @@
        }

        public class BookmarkCallback implements StringArrCallback {
-               private final Pattern pattern = 
Pattern.compile("/(.*/)([^/]*)=([A-Z]{3}@.*).*");
+               private final Pattern pattern = 
Pattern.compile("/(.*/)([^/]*)(=|?=?)([A-Z]{3}@.*).*");

                public String[] get() {
                        synchronized (BookmarkManager.this) {
@@ -106,16 +106,11 @@
                                        // FIXME: remove
                                        if (matcher.matches() && 
matcher.groupCount() == 3) {

-                                               boolean hasAnActiveLink = false;
                                                makeParents(matcher.group(1));
-                                               key = new 
FreenetURI(matcher.group(3));
+                                               key = new 
FreenetURI(matcher.group(4));
                                                String title = matcher.group(2);
-                                               if(title.endsWith("=|")) {
-                                                       title = 
title.substring(0, title.length()-2);
-                                                       hasAnActiveLink = true;
-                                               } else if(title.endsWith("=")) {
-                                                       title = 
title.substring(0, title.length()-1);
-                                               }
+                                               String middlebit = 
matcher.group(3);
+                                               boolean hasAnActiveLink = 
"=|=".equals(middlebit);
                                                addBookmark(matcher.group(1), 
new BookmarkItem(key,
                                                                title, 
hasAnActiveLink, node.alerts), false);



Reply via email to