Author: toad
Date: 2009-01-21 14:19:01 +0000 (Wed, 21 Jan 2009)
New Revision: 25184

Modified:
   trunk/freenet/src/freenet/clients/http/BookmarkEditorToadlet.java
   trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java
   trunk/freenet/src/freenet/clients/http/ConfigToadlet.java
   trunk/freenet/src/freenet/clients/http/ConnectivityToadlet.java
   trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
   trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java
   trunk/freenet/src/freenet/clients/http/PproxyToadlet.java
   trunk/freenet/src/freenet/clients/http/QueueToadlet.java
   trunk/freenet/src/freenet/clients/http/SimpleHelpToadlet.java
   trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java
   trunk/freenet/src/freenet/clients/http/StaticToadlet.java
   trunk/freenet/src/freenet/clients/http/ToadletContainer.java
   trunk/freenet/src/freenet/clients/http/ToadletContextImpl.java
   trunk/freenet/src/freenet/clients/http/TranslationToadlet.java
   trunk/freenet/src/freenet/clients/http/UserAlertsToadlet.java
   trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
   trunk/freenet/src/freenet/clients/http/bookmark/BookmarkItem.java
   trunk/freenet/src/freenet/clients/http/filter/ContentFilter.java
   trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
   trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java
   trunk/freenet/src/freenet/l10n/L10n.java
   trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
   trunk/freenet/src/freenet/node/Announcer.java
   trunk/freenet/src/freenet/node/DarknetPeerNode.java
   trunk/freenet/src/freenet/node/FNPPacketMangler.java
   trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
   trunk/freenet/src/freenet/node/Node.java
   trunk/freenet/src/freenet/node/NodeClientCore.java
   trunk/freenet/src/freenet/node/NodeIPDetector.java
   trunk/freenet/src/freenet/node/PacketSender.java
   trunk/freenet/src/freenet/node/SecurityLevels.java
   trunk/freenet/src/freenet/node/TextModeClientInterface.java
   trunk/freenet/src/freenet/node/updater/UpdateOverMandatoryManager.java
   trunk/freenet/src/freenet/node/useralerts/AbstractUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/BuildOldAgeUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/ClockProblemDetectedUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/ExtOldAgeUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/IPUndetectedUserAlert.java
   
trunk/freenet/src/freenet/node/useralerts/InvalidAddressOverrideUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/N2NTMUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/NotEnoughNiceLevelsUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/ProxyUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/TimeSkewDetectedUserAlert.java
   
trunk/freenet/src/freenet/node/useralerts/UpdatedVersionAvailableUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/UserAlert.java
   trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java
   trunk/freenet/src/freenet/pluginmanager/PluginRespirator.java
   trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
   trunk/freenet/src/freenet/support/URLEncoder.java
   trunk/freenet/test/freenet/clients/http/filter/ContentFilterTest.java
Log:
Revert more of history cloaking:
24957
24956
24955
24954
24950
24949
24948
24947
24943
24942
24941
24940 (except GenericReadFilterCallback.java)
24946
24945
24944
24940 (GenericReadFilterCallback.java)
24939
24938
24937


Modified: trunk/freenet/src/freenet/clients/http/BookmarkEditorToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/BookmarkEditorToadlet.java   
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/BookmarkEditorToadlet.java   
2009-01-21 14:19:01 UTC (rev 25184)
@@ -33,7 +33,6 @@
        private static final int MAX_NAME_LENGTH = 500;
        /** Max. bookmark path length (e.g. <code>Freenet related software and 
documentation/Freenet Message System</code> ) */
        private static final int MAX_BOOKMARK_PATH_LENGTH = 10 * 
MAX_NAME_LENGTH;
-       static final String PATH = "/bookmarkEditor/";

        private final NodeClientCore core;
        private final BookmarkManager bookmarkManager;
@@ -49,7 +48,7 @@
        /**
         * Get all bookmark as a tree of &lt;li&gt;...&lt;/li&gt;s
         */
-       private void addCategoryToList(BookmarkCategory cat, String path, 
HTMLNode list, LinkFixer fixer) {
+       private void addCategoryToList(BookmarkCategory cat, String path, 
HTMLNode list) {
                List<BookmarkItem> items = cat.getItems();

                final String edit = 
L10n.getString("BookmarkEditorToadlet.edit");
@@ -68,18 +67,18 @@
                        HTMLNode li = new HTMLNode("li", "class", "item", 
item.getName());

                        HTMLNode actions = new HTMLNode("span", "class", 
"actions");
-                       actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=edit&bookmark=" + itemPath)).addChild("img", new 
String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/edit.png"), edit, edit});
+                       actions.addChild("a", "href", "?action=edit&bookmark=" 
+ itemPath).addChild("img", new String[]{"src", "alt", "title"}, new 
String[]{"/static/icon/edit.png", edit, edit});

-                       actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=del&bookmark=" + itemPath)).addChild("img", new 
String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/delete.png"), delete, delete});
+                       actions.addChild("a", "href", "?action=del&bookmark=" + 
itemPath).addChild("img", new String[]{"src", "alt", "title"}, new 
String[]{"/static/icon/delete.png", delete, delete});

                        if(cutedPath == null)
-                               actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=cut&bookmark=" + itemPath)).addChild("img", new 
String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/cut.png"), cut, cut});
+                               actions.addChild("a", "href", 
"?action=cut&bookmark=" + itemPath).addChild("img", new String[]{"src", "alt", 
"title"}, new String[]{"/static/icon/cut.png", cut, cut});

                        if(i != 0)
-                               actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=up&bookmark=" + itemPath)).addChild("img", new 
String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/go-up.png"), moveUp, moveUp});
+                               actions.addChild("a", "href", 
"?action=up&bookmark=" + itemPath).addChild("img", new String[]{"src", "alt", 
"title"}, new String[]{"/static/icon/go-up.png", moveUp, moveUp});

                        if(i != items.size() - 1)
-                               actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=down&bookmark=" + itemPath)).addChild("img", new 
String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/go-down.png"), moveDown, moveDown});
+                               actions.addChild("a", "href", 
"?action=down&bookmark=" + itemPath).addChild("img", new String[]{"src", "alt", 
"title"}, new String[]{"/static/icon/go-down.png", moveDown, moveDown});

                        li.addChild(actions);
                        list.addChild(li);
@@ -94,33 +93,33 @@

                        HTMLNode actions = new HTMLNode("span", "class", 
"actions");

-                       actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=edit&bookmark=" + catPathEncoded)).addChild("img", 
new String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/edit.png"), edit, edit});
+                       actions.addChild("a", "href", "?action=edit&bookmark=" 
+ catPathEncoded).addChild("img", new String[]{"src", "alt", "title"}, new 
String[]{"/static/icon/edit.png", edit, edit});

-                       actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=del&bookmark=" + catPathEncoded)).addChild("img", 
new String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/delete.png"), delete, delete});
+                       actions.addChild("a", "href", "?action=del&bookmark=" + 
catPathEncoded).addChild("img", new String[]{"src", "alt", "title"}, new 
String[]{"/static/icon/delete.png", delete, delete});

-                       actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=addItem&bookmark=" + 
catPathEncoded)).addChild("img", new String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/bookmark-new.png"), addBookmark, 
addBookmark});
+                       actions.addChild("a", "href", 
"?action=addItem&bookmark=" + catPathEncoded).addChild("img", new 
String[]{"src", "alt", "title"}, new String[]{"/static/icon/bookmark-new.png", 
addBookmark, addBookmark});

-                       actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=addCat&bookmark=" + 
catPathEncoded)).addChild("img", new String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/folder-new.png"), addCategory, 
addCategory});
+                       actions.addChild("a", "href", 
"?action=addCat&bookmark=" + catPathEncoded).addChild("img", new 
String[]{"src", "alt", "title"}, new String[]{"/static/icon/folder-new.png", 
addCategory, addCategory});

                        if(cutedPath == null)
-                               actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=cut&bookmark=" + catPathEncoded)).addChild("img", 
new String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/cut.png"), cut, cut});
+                               actions.addChild("a", "href", 
"?action=cut&bookmark=" + catPathEncoded).addChild("img", new String[]{"src", 
"alt", "title"}, new String[]{"/static/icon/cut.png", cut, cut});

                        if(i != 0)
-                               actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=up&bookmark=" + catPathEncoded)).addChild("img", 
new String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/go-up.png"), moveUp, moveUp});
+                               actions.addChild("a", "href", 
"?action=up&bookmark=" + catPathEncoded).addChild("img", new String[]{"src", 
"alt", "title"}, new String[]{"/static/icon/go-up.png", moveUp, moveUp});

                        if(i != cats.size() - 1)
-                               actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=down&bookmark=" + catPathEncoded)).addChild("img", 
new String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/go-down.png"), moveDown, moveDown});
+                               actions.addChild("a", "href", 
"?action=down&bookmark=" + catPathEncoded).addChild("img", new String[]{"src", 
"alt", "title"}, new String[]{"/static/icon/go-down.png", moveDown, moveDown});

                        if(cutedPath != null && 
!catPathEncoded.startsWith(cutedPath) && 
!catPathEncoded.equals(bookmarkManager.parentPath(cutedPath)))
-                               actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=paste&bookmark=" + catPathEncoded)).addChild("img", 
new String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/paste.png"), paste, paste});
+                               actions.addChild("a", "href", 
"?action=paste&bookmark=" + catPathEncoded).addChild("img", new String[]{"src", 
"alt", "title"}, new String[]{"/static/icon/paste.png", paste, paste});

                        subCat.addChild(actions);
                        if(cats.get(i).size() != 0)
-                               addCategoryToList(cats.get(i), catPath, 
list.addChild("li").addChild("ul"), fixer);
+                               addCategoryToList(cats.get(i), catPath, 
list.addChild("li").addChild("ul"));
                }
        }

-       public HTMLNode getBookmarksList(LinkFixer fixer) {
+       public HTMLNode getBookmarksList() {
                HTMLNode bookmarks = new HTMLNode("ul", "id", "bookmarks");

                HTMLNode root = bookmarks.addChild("li", "class", "cat root", 
"/");
@@ -128,14 +127,14 @@
                String addBookmark = 
L10n.getString("BookmarkEditorToadlet.addBookmark");
                String addCategory = 
L10n.getString("BookmarkEditorToadlet.addCategory");
                String paste = L10n.getString("BookmarkEditorToadlet.paste");
-               actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=addItem&bookmark=/")).addChild("img", new 
String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/bookmark-new.png"), addBookmark, 
addBookmark});
-               actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=addCat&bookmark=/")).addChild("img", new 
String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/folder-new.png"), addCategory, 
addCategory});
+               actions.addChild("a", "href", 
"?action=addItem&bookmark=/").addChild("img", new String[]{"src", "alt", 
"title"}, new String[]{"/static/icon/bookmark-new.png", addBookmark, 
addBookmark});
+               actions.addChild("a", "href", 
"?action=addCat&bookmark=/").addChild("img", new String[]{"src", "alt", 
"title"}, new String[]{"/static/icon/folder-new.png", addCategory, 
addCategory});

                if(cutedPath != null && 
!"/".equals(bookmarkManager.parentPath(cutedPath)))
-                       actions.addChild("a", "href", 
fixer.fixLink(PATH+"?action=paste&bookmark=/")).addChild("img", new 
String[]{"src", "alt", "title"}, new 
String[]{fixer.fixLink("/static/icon/paste.png"), paste, paste});
+                       actions.addChild("a", "href", 
"?action=paste&bookmark=/").addChild("img", new String[]{"src", "alt", 
"title"}, new String[]{"/static/icon/paste.png", paste, paste});

                root.addChild(actions);
-               addCategoryToList(BookmarkManager.MAIN_CATEGORY, "/", 
root.addChild("ul"), fixer);
+               addCategoryToList(BookmarkManager.MAIN_CATEGORY, "/", 
root.addChild("ul"));

                return bookmarks;
        }
@@ -256,7 +255,7 @@
                }

                HTMLNode bookmarksBox = 
content.addChild(pageMaker.getInfobox("infobox-normal", 
L10n.getString("BookmarkEditorToadlet.myBookmarksTitle")));
-               
pageMaker.getContentNode(bookmarksBox).addChild(getBookmarksList(ctx));
+               
pageMaker.getContentNode(bookmarksBox).addChild(getBookmarksList());

                HTMLNode addDefaultBookmarksForm = ctx.addFormChild(content, 
"", "AddDefaultBookmarks");
                addDefaultBookmarksForm.addChild("input", new String[]{"type", 
"name", "value"}, new String[]{"submit", "AddDefaultBookmarks", 
L10n.getString("BookmarkEditorToadlet.addDefaultBookmarks")});
@@ -354,7 +353,7 @@
                        pageMaker.getContentNode(errorBox).addChild("#", 
L10n.getString("BookmarkEditorToadlet.invalidKey"));
                }
                HTMLNode bookmarksBox = 
content.addChild(pageMaker.getInfobox("infobox-normal", 
L10n.getString("BookmarkEditorToadlet.myBookmarksTitle")));
-               
pageMaker.getContentNode(bookmarksBox).addChild(getBookmarksList(ctx));
+               
pageMaker.getContentNode(bookmarksBox).addChild(getBookmarksList());

                HTMLNode addDefaultBookmarksForm = ctx.addFormChild(content, 
"", "AddDefaultBookmarks");
                addDefaultBookmarksForm.addChild("input", new String[]{"type", 
"name", "value"}, new String[]{"submit", "AddDefaultBookmarks", 
L10n.getString("BookmarkEditorToadlet.addDefaultBookmarks")});

Modified: trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java      
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java      
2009-01-21 14:19:01 UTC (rev 25184)
@@ -191,7 +191,7 @@
                HTMLNode contentNode = 
ctx.getPageMaker().getContentNode(pageNode);

                if(ctx.isAllowedFullAccess())
-                       contentNode.addChild(core.alerts.createSummary(ctx));
+                       contentNode.addChild(core.alerts.createSummary());

                // #### Test MIME inline
                HTMLNode mimeAutodetectBox = 
contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-warning", "MIME 
Inline"));

Modified: trunk/freenet/src/freenet/clients/http/ConfigToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/ConfigToadlet.java   2009-01-21 
13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/ConfigToadlet.java   2009-01-21 
14:19:01 UTC (rev 25184)
@@ -56,7 +56,7 @@

                @Override
                public String getText() {
-                       return getHTMLText(NullLinkFixer.instance).toString();
+                       return getHTMLText().toString();
                }

                @Override
@@ -65,7 +65,7 @@
                }

                @Override
-               public HTMLNode getHTMLText(LinkFixer fixer) {
+               public HTMLNode getHTMLText() {
                        HTMLNode alertNode = new HTMLNode("div");
                        alertNode.addChild("#", l10n("needRestart"));

@@ -350,7 +350,7 @@
                HTMLNode pageNode = 
ctx.getPageMaker().getPageNode(L10n.getString("ConfigToadlet.fullTitle", new 
String[] { "name" }, new String[] { node.getMyName() }), ctx);
                HTMLNode contentNode = 
ctx.getPageMaker().getContentNode(pageNode);

-               contentNode.addChild(core.alerts.createSummary(ctx));
+               contentNode.addChild(core.alerts.createSummary());

                final int mode = 
ctx.getPageMaker().drawModeSelectionArray(core, ctx, req, contentNode, 
MODE_SECURITY_LEVELS, "SecurityLevels.title", "SecurityLevels.tooltip", 
"/config/");

@@ -390,9 +390,9 @@
                                String defaultValue = "128";
                                item.addChild("span", new String[]{ "class", 
"title", "style" },
                                                new String[]{ 
"configshortdesc", L10n.getString("ConfigToadlet.defaultIs", new String[] { 
"default" }, new String[] { defaultValue }),
-                                               "cursor: help;" 
}).addChild(L10n.getHTMLNode("WrapperConfig."+configName+".short", ctx));
+                                               "cursor: help;" 
}).addChild(L10n.getHTMLNode("WrapperConfig."+configName+".short"));
                                item.addChild("span", "class", 
"config").addChild("input", new String[] { "type", "class", "name", "value" }, 
new String[] { "text", "config", configName, curValue });
-                               item.addChild("span", "class", 
"configlongdesc").addChild(L10n.getHTMLNode("WrapperConfig."+configName+".long",
 ctx));
+                               item.addChild("span", "class", 
"configlongdesc").addChild(L10n.getHTMLNode("WrapperConfig."+configName+".long"));
                        }
                }

@@ -411,7 +411,7 @@
                                        HTMLNode configItemNode = 
configGroupUlNode.addChild("li");
                                        configItemNode.addChild("span", new 
String[]{ "class", "title", "style" },
                                                        new String[]{ 
"configshortdesc", L10n.getString("ConfigToadlet.defaultIs", new String[] { 
"default" }, new String[] { o[j].getDefault() }) + (mode >= 
PageMaker.MODE_ADVANCED ? " ["+sc[i].getPrefix() + '.' + o[j].getName() + ']' : 
""),
-                                                       "cursor: help;" 
}).addChild(L10n.getHTMLNode(o[j].getShortDesc(), ctx));
+                                                       "cursor: help;" 
}).addChild(L10n.getHTMLNode(o[j].getShortDesc()));
                                        HTMLNode configItemValueNode = 
configItemNode.addChild("span", "class", "config");
                                        if(o[j].getValueString() == null){
                                                Logger.error(this, 
sc[i].getPrefix() + configName + "has returned null from config!);");
@@ -436,7 +436,7 @@
                                                        new String[] { "text", 
"config", o[j].getShortDesc(),
                                                                
sc[i].getPrefix() + '.' + configName, o[j].getValueString() });

-                                       configItemNode.addChild("span", 
"class", "configlongdesc").addChild(L10n.getHTMLNode(o[j].getLongDesc(), ctx));
+                                       configItemNode.addChild("span", 
"class", "configlongdesc").addChild(L10n.getHTMLNode(o[j].getLongDesc()));
                                }
                        }


Modified: trunk/freenet/src/freenet/clients/http/ConnectivityToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/ConnectivityToadlet.java     
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/ConnectivityToadlet.java     
2009-01-21 14:19:01 UTC (rev 25184)
@@ -69,7 +69,7 @@

                // Add connection type box.

-               node.ipDetector.addConnectionTypeBox(contentNode, ctx);
+               node.ipDetector.addConnectionTypeBox(contentNode);

                UdpSocketHandler[] handlers = node.getPacketSocketHandlers();


Modified: trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/FProxyToadlet.java   2009-01-21 
13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/FProxyToadlet.java   2009-01-21 
14:19:01 UTC (rev 25184)
@@ -184,7 +184,7 @@
                Bucket toFree = null;
                try {
                        if((!force) && (!forceDownload)) {
-                               FilterOutput fo = ContentFilter.filter(data, 
bucketFactory, mimeType, key.toURI(basePath), container.enableInlinePrefetch() 
? prefetchHook : null, ctx);
+                               FilterOutput fo = ContentFilter.filter(data, 
bucketFactory, mimeType, key.toURI(basePath), container.enableInlinePrefetch() 
? prefetchHook : null);
                                if(data != fo.data) toFree = fo.data;
                                data = fo.data;
                                mimeType = fo.type;
@@ -508,7 +508,7 @@
                        if(Logger.shouldLog(Logger.MINOR, this))
                                Logger.minor(this, "Failed to fetch "+uri+" : 
"+e);
                        if(e.newURI != null) {
-                               Toadlet.writePermanentRedirect(ctx, msg, 
ctx.fixLink('/' +e.newURI.toASCIIString() + override));
+                               Toadlet.writePermanentRedirect(ctx, msg, '/' 
+e.newURI.toASCIIString() + override);
                        } else if(e.mode == FetchException.TOO_BIG) {
                                HTMLNode pageNode = 
ctx.getPageMaker().getPageNode(l10n("fileInformationTitle"), ctx);
                                HTMLNode contentNode = 
ctx.getPageMaker().getContentNode(pageNode);

Modified: trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java  
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java  
2009-01-21 14:19:01 UTC (rev 25184)
@@ -76,7 +76,7 @@
                HTMLNode pageNode = pageMaker.getPageNode(l10n("listingTitle", 
"path", currentPath.getAbsolutePath()), toadletContext);
                HTMLNode contentNode = pageMaker.getContentNode(pageNode);
                if(toadletContext.isAllowedFullAccess())
-                       
contentNode.addChild(core.alerts.createSummary(toadletContext));
+                       contentNode.addChild(core.alerts.createSummary());

                HTMLNode infoboxDiv = contentNode.addChild("div", "class", 
"infobox");
                infoboxDiv.addChild("div", "class", "infobox-header", 
l10n("listing", "path",  currentPath.getAbsolutePath()));

Modified: trunk/freenet/src/freenet/clients/http/PproxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/PproxyToadlet.java   2009-01-21 
13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/PproxyToadlet.java   2009-01-21 
14:19:01 UTC (rev 25184)
@@ -307,13 +307,13 @@
                                }
                                HTMLNode contentNode = 
ctx.getPageMaker().getContentNode(pageNode);

-                               
contentNode.addChild(core.alerts.createSummary(ctx));
+                               
contentNode.addChild(core.alerts.createSummary());

                                UserAlert[] userAlerts = 
core.alerts.getAlerts();
                                for (int index = 0, count = userAlerts.length; 
index < count; index++) {
                                        UserAlert userAlert = userAlerts[index];
                                        if (userAlert.isValid() && 
(userAlert.getUserIdentifier() == PluginManager.class)) {
-                                               
contentNode.addChild(core.alerts.renderAlert(userAlert, ctx));
+                                               
contentNode.addChild(core.alerts.renderAlert(userAlert));
                                        }
                                }


Modified: trunk/freenet/src/freenet/clients/http/QueueToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/QueueToadlet.java    2009-01-21 
13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/QueueToadlet.java    2009-01-21 
14:19:01 UTC (rev 25184)
@@ -473,7 +473,7 @@
                HTMLNode pageNode = pageMaker.getPageNode(header, context);
                HTMLNode contentNode = pageMaker.getContentNode(pageNode);
                if(context.isAllowedFullAccess())
-                       
contentNode.addChild(core.alerts.createSummary(context));
+                       contentNode.addChild(core.alerts.createSummary());
                HTMLNode infobox = 
contentNode.addChild(pageMaker.getInfobox("infobox-error", header));
                HTMLNode infoboxContent = pageMaker.getContentNode(infobox);
                infoboxContent.addChild("#", message);
@@ -520,7 +520,7 @@
                                                        String mimeType = 
clientGet.getMIMEType();
                                                        String 
requestedMimeType = request.getParam("type", null);
                                                        String forceString = 
request.getParam("force");
-                                                       
FProxyToadlet.handleDownload(ctx, data, ctx.getBucketFactory(), mimeType, 
requestedMimeType, forceString, request.isParameterSet("forcedownload"), 
"/queue/", key, "", "/queue/", false, ctx, core);
+                                                       
FProxyToadlet.handleDownload(ctx, data, ctx.getBucketFactory(), mimeType, 
requestedMimeType, forceString, request.isParameterSet("forcedownload"), 
"/queue/", uri, "", "/queue/", false, ctx, core);
                                                        return;
                                                }
                                        }
@@ -555,7 +555,7 @@
                        HTMLNode contentNode = 
pageMaker.getContentNode(pageNode);
                        /* add alert summary box */
                        if(ctx.isAllowedFullAccess())
-                               
contentNode.addChild(core.alerts.createSummary(ctx));
+                               
contentNode.addChild(core.alerts.createSummary());
                        HTMLNode infobox = 
contentNode.addChild(pageMaker.getInfobox("infobox-information", 
L10n.getString("QueueToadlet.globalQueueIsEmpty")));
                        HTMLNode infoboxContent = 
pageMaker.getContentNode(infobox);
                        infoboxContent.addChild("#", 
L10n.getString("QueueToadlet.noTaskOnGlobalQueue"));

Modified: trunk/freenet/src/freenet/clients/http/SimpleHelpToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/SimpleHelpToadlet.java       
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/SimpleHelpToadlet.java       
2009-01-21 14:19:01 UTC (rev 25184)
@@ -34,7 +34,7 @@
                HTMLNode contentNode = 
ctx.getPageMaker().getContentNode(pageNode);

                if(ctx.isAllowedFullAccess())
-                       contentNode.addChild(core.alerts.createSummary(ctx));
+                       contentNode.addChild(core.alerts.createSummary());

                // Description infobox
                HTMLNode helpScreenBox1 = 
contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-content", 
L10n.getString("SimpleHelpToadlet.descriptionTitle")));

Modified: trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java     
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java     
2009-01-21 14:19:01 UTC (rev 25184)
@@ -38,9 +38,6 @@
 import freenet.support.HTMLNode;
 import freenet.support.Logger;
 import freenet.support.OOMHandler;
-import freenet.support.URLDecoder;
-import freenet.support.URLEncodedFormatException;
-import freenet.support.URLEncoder;
 import freenet.support.api.BooleanCallback;
 import freenet.support.api.BucketFactory;
 import freenet.support.api.IntCallback;
@@ -832,10 +829,8 @@
                return bf;
        }

-       public String generateSID(String realPath) throws 
URLEncodedFormatException {
+       public String generateSID(String realPath) {
                MessageDigest md = SHA256.getMessageDigest();
-               String oldRealPath = realPath;
-               realPath = prepareForSID(realPath);
                try {
                        md.update(realPath.getBytes("UTF-8"));
                } catch (UnsupportedEncodingException e) {
@@ -847,42 +842,6 @@
                return Base64.encode(output);
        }

-       private String prepareForSID(String realPath) throws 
URLEncodedFormatException {
-               StringBuffer sb = new StringBuffer(realPath.length());
-               int idx = realPath.indexOf('?');
-               String query = null;
-               if(idx > -1) {
-                       query = realPath.substring(idx+1);
-                       realPath = realPath.substring(0, idx);
-               }
-               String[] split = realPath.split("/");
-               boolean first = true;
-               for(String component : split) {
-                       if(!first) sb.append('/');
-                       first = false;
-                       if(component.indexOf('%') > -1)
-                               component = URLDecoder.decode(component, true);
-                       component = URLEncoder.minimalEncode(component, "/?");
-                       sb.append(component);
-               }
-               if(query != null) {
-                       sb.append('?');
-                       split = query.split("&");
-                       first = true;
-                       for(String component : split) {
-                               if(!first) sb.append('&');
-                               first = false;
-                               if(component.indexOf('%') > -1)
-                                       component = 
URLDecoder.decode(component, true);
-                               component = URLEncoder.minimalEncode(component, 
"&");
-                               sb.append(component);
-                       }
-               }
-               return sb.toString();
-       }
-
-
-
        public boolean isSecureIDCheckingDisabled() {
                return !enableHistoryCloaking;
        }
@@ -900,16 +859,11 @@
                        frag = toSign.substring(hashIndex);
                        toSign = toSign.substring(0, hashIndex);
                }
-               try {
                if(orig.indexOf('?') == -1) {
                        return toSign + "?secureid=" + generateSID(toSign) + 
frag;
                } else {
                        return toSign + "&secureid=" + generateSID(toSign) + 
frag;
                }
-               } catch (URLEncodedFormatException e) {
-                       Logger.error(this, "UNABLE TO ENCODE INTERNALLY 
GENERATED STRING: "+orig+" because URL decode failure: "+e);
-                       return orig;
-               }
        }

        public URI fixLink(URI uri) throws URISyntaxException {
@@ -919,16 +873,11 @@
                if(uri.getFragment() != null) {
                        toSign = toSign.substring(0, toSign.indexOf('#'));
                }
-               try {
                if(uri.getQuery() == null) {
                        return new URI(uri.getScheme(), uri.getUserInfo(), 
uri.getHost(), uri.getPort(), uri.getPath(), "secureid="+generateSID(toSign), 
uri.getFragment());
                } else {
                        return new URI(uri.getScheme(), uri.getUserInfo(), 
uri.getHost(), uri.getPort(), uri.getPath(), 
uri.getQuery()+"&secureid="+generateSID(toSign), uri.getFragment());
                }
-               } catch (URLEncodedFormatException e) {
-                       Logger.error(this, "UNABLE TO ENCODE INTERNALLY 
GENERATED STRING: "+uri+" because URL decode failure: "+e);
-                       return uri;
-               }
        }

        public synchronized void setNonce(byte[] nonce) {

Modified: trunk/freenet/src/freenet/clients/http/StaticToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/StaticToadlet.java   2009-01-21 
13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/StaticToadlet.java   2009-01-21 
14:19:01 UTC (rev 25184)
@@ -9,8 +9,6 @@
 import java.util.Date;

 import freenet.client.DefaultMIMETypes;
-import freenet.clients.http.filter.ContentFilter;
-import freenet.clients.http.filter.ContentFilter.FilterOutput;
 import freenet.l10n.L10n;
 import freenet.support.api.Bucket;
 import freenet.support.api.HTTPRequest;
@@ -64,18 +62,10 @@
                strm.close();
                os.close();

-               String mimeType = DefaultMIMETypes.guessMIMEType(path, false);
-               
-               if(mimeType.equals("text/css")) {
-                       // Easiest way to fix the links is just to pass it 
through the content filter.
-                       FilterOutput fo = ContentFilter.filter(data, 
ctx.getBucketFactory(), mimeType, uri, null, ctx);
-                       data = fo.data;
-               }
-               
                URL url = getClass().getResource(ROOT_PATH+path);
                Date mTime = getUrlMTime(url);

-               ctx.sendReplyHeaders(200, "OK", null, mimeType, data.size(), 
mTime);
+               ctx.sendReplyHeaders(200, "OK", null, 
DefaultMIMETypes.guessMIMEType(path, false), data.size(), mTime);

                ctx.writeData(data);
                data.free();

Modified: trunk/freenet/src/freenet/clients/http/ToadletContainer.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/ToadletContainer.java        
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/ToadletContainer.java        
2009-01-21 14:19:01 UTC (rev 25184)
@@ -9,7 +9,6 @@

 import freenet.clients.http.PageMaker.THEME;
 import freenet.support.HTMLNode;
-import freenet.support.URLEncodedFormatException;
 import freenet.support.api.BucketFactory;

 /** Interface for toadlet containers. Toadlets should register here. */
@@ -70,9 +69,8 @@
         * URIs don't go into the browser history.
         * @param realPath
         * @return
-        * @throws URLEncodedFormatException 
         */
-       public String generateSID(String realPath) throws 
URLEncodedFormatException;
+       public String generateSID(String realPath);

        /**
         * If true, secure-id checking is disabled.

Modified: trunk/freenet/src/freenet/clients/http/ToadletContextImpl.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/ToadletContextImpl.java      
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/ToadletContextImpl.java      
2009-01-21 14:19:01 UTC (rev 25184)
@@ -23,7 +23,6 @@
 import freenet.support.Logger;
 import freenet.support.MultiValueTable;
 import freenet.support.URIPreEncoder;
-import freenet.support.URLEncodedFormatException;
 import freenet.support.api.Bucket;
 import freenet.support.api.BucketFactory;
 import freenet.support.io.BucketTools;
@@ -94,14 +93,6 @@
        }

        /**
-        * Send an error message. Caller provides the HTTP code, reason string, 
and a message, which
-        * will become the title and the h1'ed contents of the error page. 
-        */
-       private void sendError(int code, String httpReason, String message, 
boolean shouldDisconnect, MultiValueTable<String,String> mvt) throws 
IOException {
-               sendHTMLError(sockOutputStream, code, httpReason, 
"<html><head><title>"+message+"</title></head><body><h1>"+message+"</h1></body>",
 shouldDisconnect, mvt);
-       }
-       
-       /**
         * Send an error message, containing full HTML from a String.
         * @param os The OutputStream to send the message to.
         * @param code The HTTP status code.
@@ -445,13 +436,7 @@
                String queries = getQueriesNoSecureID(uri);
                String realPath = path;
                if(queries != null) realPath += queries;
-               String expectedSecureID;
-               try {
-                       expectedSecureID = ctx.container.generateSID(realPath);
-               } catch (URLEncodedFormatException e1) {
-                       ctx.sendError(400, "Bad Request", 
l10n("invalidURICheckingSecureID"), false, null);
-                       return true;
-               }
+               String expectedSecureID = ctx.container.generateSID(realPath);
                if(secureid != null && expectedSecureID.equals(secureid)) {
                        return false;
                }
@@ -503,7 +488,7 @@
                        else return null;
                } else {
                        int idx = query.indexOf("&secureid=");
-                       if(idx == -1) return '?' + query;
+                       if(idx == -1) return query;
                        String before = query.substring(0, idx);
                        String after = 
query.substring(idx+"&secureid=".length());
                        int x = after.indexOf('&');

Modified: trunk/freenet/src/freenet/clients/http/TranslationToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/TranslationToadlet.java      
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/TranslationToadlet.java      
2009-01-21 14:19:01 UTC (rev 25184)
@@ -159,12 +159,12 @@
                HTMLNode translationNode = contentNode.addChild("div", "class", 
"translation");
                HTMLNode translationHeaderNode = translationNode.addChild("p");
                translationHeaderNode.addChild("#", 
l10n("contributingToLabelWithLang", "lang", 
L10n.getSelectedLanguage().fullName));
-               translationHeaderNode.addChild("a", "href", 
ctx.fixLink(TOADLET_URL+"?getOverrideTranlationFile")).addChild("#", 
l10n("downloadTranslationsFile"));
+               translationHeaderNode.addChild("a", "href", 
TOADLET_URL+"?getOverrideTranlationFile").addChild("#", 
l10n("downloadTranslationsFile"));
                translationHeaderNode.addChild("#", " ");
                if(showEverything)
-                       translationHeaderNode.addChild("a", "href", 
ctx.fixLink(TOADLET_URL+"?toTranslateOnly")).addChild("#", 
l10n("hideAlreadyTranslated"));
+                       translationHeaderNode.addChild("a", "href", 
TOADLET_URL+"?toTranslateOnly").addChild("#", l10n("hideAlreadyTranslated"));
                else
-                       translationHeaderNode.addChild("a", "href", 
ctx.fixLink(TOADLET_URL)).addChild("#", l10n("showEverything"));
+                       translationHeaderNode.addChild("a", "href", 
TOADLET_URL).addChild("#", l10n("showEverything"));
                HTMLNode legendTable = translationNode.addChild("table", 
"class", "translation");

                HTMLNode legendRow = legendTable.addChild("tr");
@@ -188,7 +188,7 @@
                                                L10n.getDefaultString(key)
                                );

-                               contentRow.addChild("td", "class", 
"translation-new").addChild(_setOrRemoveOverride(key, isOverriden, 
showEverything, ctx));
+                               contentRow.addChild("td", "class", 
"translation-new").addChild(_setOrRemoveOverride(key, isOverriden, 
showEverything));
                        }
                }

@@ -245,7 +245,7 @@

        private void redirectTo(ToadletContext ctx, String target) throws 
ToadletContextClosedException, IOException {
                MultiValueTable<String, String> headers = new 
MultiValueTable<String, String>();
-               headers.put("Location", ctx.fixLink(target));
+               headers.put("Location", target);
                ctx.sendReplyHeaders(302, "Found", headers, null, 0);
                return;
        }
@@ -255,18 +255,18 @@
                return "GET, POST";
        }

-       private HTMLNode _setOrRemoveOverride(String key, boolean isOverriden, 
boolean showEverything, LinkFixer fixer) {
+       private HTMLNode _setOrRemoveOverride(String key, boolean isOverriden, 
boolean showEverything) {
                String value = L10n.getString(key, true);

                HTMLNode translationField = new HTMLNode("span", "class", 
isOverriden ? "translate_d" : "translate_it");
                if(value == null) {
                        translationField.addChild("#", 
L10n.getDefaultString(key));
-                       translationField.addChild("a", "href", 
fixer.fixLink(TranslationToadlet.TOADLET_URL+"?translate=" + key + 
(showEverything ? "" : "&toTranslateOnly"))).addChild("small", 
l10n("bracketTranslateIt"));
+                       translationField.addChild("a", "href", 
TranslationToadlet.TOADLET_URL+"?translate=" + key + (showEverything ? "" : 
"&toTranslateOnly")).addChild("small", l10n("bracketTranslateIt"));
                } else {
                        translationField.addChild("#", L10n.getString(key));
-                       translationField.addChild("a", "href", 
fixer.fixLink(TranslationToadlet.TOADLET_URL+"?translate=" + key + 
(showEverything ? "" : "&toTranslateOnly"))).addChild("small", 
l10n("bracketUpdateTranslation"));
+                       translationField.addChild("a", "href", 
TranslationToadlet.TOADLET_URL+"?translate=" + key + (showEverything ? "" : 
"&toTranslateOnly")).addChild("small", l10n("bracketUpdateTranslation"));
                        if(isOverriden)
-                               translationField.addChild("a", "href", 
fixer.fixLink(TranslationToadlet.TOADLET_URL+"?remove=" + key + (showEverything 
? "" : "&toTranslateOnly"))).addChild("small", l10n("bracketRemoveOverride"));
+                               translationField.addChild("a", "href", 
TranslationToadlet.TOADLET_URL+"?remove=" + key + (showEverything ? "" : 
"&toTranslateOnly")).addChild("small", l10n("bracketRemoveOverride"));
                }

                return translationField;

Modified: trunk/freenet/src/freenet/clients/http/UserAlertsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/UserAlertsToadlet.java       
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/UserAlertsToadlet.java       
2009-01-21 14:19:01 UTC (rev 25184)
@@ -43,7 +43,7 @@

         HTMLNode pageNode = 
ctx.getPageMaker().getPageNode(l10n("titleWithName", "name", node.getMyName()), 
ctx);
         HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode);
-        contentNode.addChild(alerts.createAlerts(ctx));
+        contentNode.addChild(alerts.createAlerts());

         writeHTMLReply(ctx, 200, "OK", pageNode.generate());
        }

Modified: trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java  2009-01-21 
13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java  2009-01-21 
14:19:01 UTC (rev 25184)
@@ -548,7 +548,7 @@

         // Alerts
         if (ctx.isAllowedFullAccess()) {
-            
contentNode.addChild(core.alerts.createAlertsShort(l10n("alertsSummary"), 
advancedModeOutputEnabled, true, ctx));
+            
contentNode.addChild(core.alerts.createAlertsShort(l10n("alertsSummary"), 
advancedModeOutputEnabled, true));
         }

                // Search Box

Modified: trunk/freenet/src/freenet/clients/http/bookmark/BookmarkItem.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/bookmark/BookmarkItem.java   
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/bookmark/BookmarkItem.java   
2009-01-21 14:19:01 UTC (rev 25184)
@@ -3,7 +3,6 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.clients.http.bookmark;

-import freenet.clients.http.LinkFixer;
 import freenet.keys.FreenetURI;
 import freenet.keys.USK;
 import freenet.l10n.L10n;
@@ -82,10 +81,10 @@
         }

         @Override
-               public HTMLNode getHTMLText(LinkFixer fixer) {
+               public HTMLNode getHTMLText() {
             HTMLNode n = new HTMLNode("div");
             L10n.addL10nSubstitution(n, 
"BookmarkItem.bookmarkUpdatedWithLink", new String[]{"link", "/link", "name", 
"edition"},
-                    new String[]{"<a href=\"" + 
fixer.fixLink("/"+key.toString()) + "\">", "</a>", HTMLEncoder.encode(name), 
Long.toString(key.getSuggestedEdition())});
+                    new String[]{"<a href=\"/" + key.toString() + "\">", 
"</a>", HTMLEncoder.encode(name), Long.toString(key.getSuggestedEdition())});
             return n;
         }


Modified: trunk/freenet/src/freenet/clients/http/filter/ContentFilter.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/filter/ContentFilter.java    
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/filter/ContentFilter.java    
2009-01-21 14:19:01 UTC (rev 25184)
@@ -12,7 +12,6 @@
 import java.util.HashMap;
 import java.util.Hashtable;

-import freenet.clients.http.LinkFixer;
 import freenet.l10n.L10n;
 import freenet.support.Logger;
 import freenet.support.api.Bucket;
@@ -137,7 +136,7 @@
         * @throws IllegalStateException
         *             If data is invalid (e.g. corrupted file) and the filter 
have no way to recover.
         */
-       public static FilterOutput filter(Bucket data, BucketFactory bf, String 
typeName, URI baseURI, FoundURICallback cb, LinkFixer fixer) throws 
UnsafeContentTypeException, IOException {
+       public static FilterOutput filter(Bucket data, BucketFactory bf, String 
typeName, URI baseURI, FoundURICallback cb) throws UnsafeContentTypeException, 
IOException {
                if(Logger.shouldLog(Logger.MINOR, ContentFilter.class))
                        Logger.minor(ContentFilter.class, 
"filter(data.size="+data.size()+" typeName="+typeName);
                String type = typeName;
@@ -185,7 +184,7 @@
                                        charset = detectCharset(data, handler);
                                }

-                               Bucket outputData = 
handler.readFilter.readFilter(data, bf, charset, otherParams, new 
GenericReadFilterCallback(baseURI, cb, fixer));
+                               Bucket outputData = 
handler.readFilter.readFilter(data, bf, charset, otherParams, new 
GenericReadFilterCallback(baseURI, cb));
                                if(charset != null)
                                        type = type + "; charset="+charset;
                                return new FilterOutput(outputData, type);

Modified: 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
===================================================================
--- 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2009-01-21 13:59:00 UTC (rev 25183)
+++ 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2009-01-21 14:19:01 UTC (rev 25184)
@@ -11,7 +11,6 @@
 import java.util.HashSet;

 import freenet.clients.http.HTTPRequestImpl;
-import freenet.clients.http.LinkFixer;
 import freenet.clients.http.StaticToadlet;
 import freenet.keys.FreenetURI;
 import freenet.l10n.L10n;
@@ -41,21 +40,18 @@
        private URI baseURI;
        private URI strippedBaseURI;
        private final FoundURICallback cb;
-       private final LinkFixer fixer;

-       public GenericReadFilterCallback(URI uri, FoundURICallback cb, 
LinkFixer fixer) {
-               this.fixer = fixer;
+       public GenericReadFilterCallback(URI uri, FoundURICallback cb) {
                this.baseURI = uri;
                this.cb = cb;
                setStrippedURI(uri.toString());
        }

-       public GenericReadFilterCallback(FreenetURI uri, FoundURICallback cb, 
LinkFixer fixer) {
+       public GenericReadFilterCallback(FreenetURI uri, FoundURICallback cb) {
                try {
                        this.baseURI = uri.toRelativeURI();
                        setStrippedURI(baseURI.toString());
                        this.cb = cb;
-                       this.fixer = fixer;
                } catch (URISyntaxException e) {
                        throw new Error(e);
                }
@@ -135,10 +131,10 @@
                                        bookmark_activelink = 
HTMLEncoder.encode(bookmark_activelink);
                                        url = url+"&hasAnActivelink=true";
                                }
-                               return fixer.fixLink(url);
+                               return url;
                        } else if(path.startsWith(StaticToadlet.ROOT_URL)) {
                                // @see bug #2297
-                               return fixer.fixLink(path);
+                               return path;
                        }
                }

@@ -179,36 +175,29 @@
                        // Relative URI

                        rpath = resolved.getPath();
+                       if(rpath == null) throw new CommentException("No URI");
+                       if(logMINOR) Logger.minor(this, "Resolved URI (rpath 
relative): "+rpath);

-                       if(rpath == null) reason = "No URI";
-                       else {
-                               if(rpath.startsWith(StaticToadlet.ROOT_URL)) {
-                                       return fixer.fixLink(rpath);
+                       // Valid FreenetURI?
+                       try {
+                               String p = rpath;
+                               while(p.startsWith("/")) p = p.substring(1);
+                               FreenetURI furi = new FreenetURI(p);
+                               if(logMINOR) Logger.minor(this, "Parsed: 
"+furi);
+                               return processURI(furi, uri, overrideType, 
noRelative, inline);
+                       } catch (MalformedURLException e) {
+                               if(logMINOR) Logger.minor(this, "Malformed URL 
(b): "+e, e);
+                               if(e.getMessage() != null) {
+                                       reason = l10n("malformedRelativeURL", 
"error", e.getMessage());
+                               } else {
+                                       reason = 
l10n("couldNotParseRelativeFreenetURI");
                                }
-                               
-                               if(logMINOR) Logger.minor(this, "Resolved URI 
(rpath relative): "+rpath);
-                               
-                               // Valid FreenetURI?
-                               try {
-                                       String p = rpath;
-                                       while(p.startsWith("/")) p = 
p.substring(1);
-                                       FreenetURI furi = new FreenetURI(p);
-                                       if(logMINOR) Logger.minor(this, 
"Parsed: "+furi);
-                                       return processURI(furi, uri, 
overrideType, noRelative, inline);
-                               } catch (MalformedURLException e) {
-                                       if(logMINOR) Logger.minor(this, 
"Malformed URL (b): "+e, e);
-                                       if(e.getMessage() != null) {
-                                               reason = 
l10n("malformedRelativeURL", "error", e.getMessage());
-                                       } else {
-                                               reason = 
l10n("couldNotParseRelativeFreenetURI");
-                                       }
-                               }
-                       
                        }
+               
                }

                
if(GenericReadFilterCallback.allowedProtocols.contains(uri.getScheme()))
-                       return 
fixer.fixLink("/?"+GenericReadFilterCallback.magicHTTPEscapeString+ '=' 
+freenet.support.URLEncoder.encode(uri.toString(), false));
+                       return 
"/?"+GenericReadFilterCallback.magicHTTPEscapeString+ '=' +uri;
                else {
                        if(uri.getScheme() == null) {
                                throw new CommentException(reason);
@@ -248,17 +237,15 @@
                        sb.append(path);
                        if(typeOverride != null) {
                                sb.append("?type=");
-                               
sb.append(freenet.support.URLEncoder.encode(typeOverride, false));
+                               sb.append(typeOverride);
                        }
                        if(u.getFragment() != null) {
                                sb.append('#');
-                               
sb.append(freenet.support.URLEncoder.encode(u.getFragment(), false));
+                               sb.append(u.getRawFragment());
                        }

                        URI uri = new URI(sb.toString());

-                       uri = fixer.fixLink(uri);
-                       
                        if(!noRelative)
                                uri = strippedBaseURI.relativize(uri);
                        if(Logger.shouldLog(Logger.MINOR, this))
@@ -268,7 +255,7 @@
                        Logger.error(this, "Could not parse own URI: 
path="+path+", typeOverride="+typeOverride+", frag="+u.getFragment()+" : "+e, 
e);
                        String p = path;
                        if(typeOverride != null)
-                               p += 
"?type="+freenet.support.URLEncoder.encode(typeOverride, false);
+                               p += "?type="+typeOverride;
                        if(u.getFragment() != null){
                                try{
                                // FIXME encode it properly
@@ -358,7 +345,7 @@
        }

        public static String escapeURL(String uri) {
-               return "/?" + magicHTTPEscapeString + '=' + 
freenet.support.URLEncoder.encode(uri, false);
+               return "/?" + magicHTTPEscapeString + '=' + uri;
        }

 }

Modified: trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java        
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java        
2009-01-21 14:19:01 UTC (rev 25184)
@@ -304,7 +304,7 @@
                final Bucket out = new FileBucket(fout, false, true, false, 
false, false);
                try {
                        Logger.setupStdoutLogging(Logger.MINOR, "");
-                       ContentFilter.FilterOutput output = 
ContentFilter.filter(data, new ArrayBucketFactory(), "image/png", new 
URI("http://127.0.0.1:8888/";), null, null);
+                       ContentFilter.FilterOutput output = 
ContentFilter.filter(data, new ArrayBucketFactory(), "image/png", new 
URI("http://127.0.0.1:8888/";), null);
                        BucketTools.copy(output.data, out);
                } catch(IOException e) {
                        System.out.println("Bucket error?: " + e.getMessage());

Modified: trunk/freenet/src/freenet/l10n/L10n.java
===================================================================
--- trunk/freenet/src/freenet/l10n/L10n.java    2009-01-21 13:59:00 UTC (rev 
25183)
+++ trunk/freenet/src/freenet/l10n/L10n.java    2009-01-21 14:19:01 UTC (rev 
25184)
@@ -9,7 +9,6 @@
 import java.io.InputStream;
 import java.util.MissingResourceException;

-import freenet.clients.http.LinkFixer;
 import freenet.clients.http.TranslationToadlet;
 import freenet.support.HTMLEncoder;
 import freenet.support.HTMLNode;
@@ -280,13 +279,13 @@
        * @param key
        * @return HTMLNode
        */
-       public static HTMLNode getHTMLNode(String key, LinkFixer fixer) {
+       public static HTMLNode getHTMLNode(String key) {
                String value = getString(key, true);
                if(value != null)
                        return new HTMLNode("#", value);
                HTMLNode translationField = new HTMLNode("span", "class", 
"translate_it") ;
                translationField.addChild("#", getDefaultString(key));
-               translationField.addChild("a", "href", 
fixer.fixLink(TranslationToadlet.TOADLET_URL+"?translate=" + 
key)).addChild("small", " (translate it in your native language!)");
+               translationField.addChild("a", "href", 
TranslationToadlet.TOADLET_URL+"?translate=" + key).addChild("small", " 
(translate it in your native language!)");

                return translationField;
        }

Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2009-01-21 
13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2009-01-21 
14:19:01 UTC (rev 25184)
@@ -1282,7 +1282,6 @@
 ToadletContextImpl.cannotParseContentLength=Content-length parse error: 
${error}
 ToadletContextImpl.cannotParseContentLengthWithError=Cannot parse the 
content-length: ${error}
 ToadletContextImpl.headersLineTooLong=Line too long parsing headers
-ToadletContextImpl.invalidURICheckingSecureID=Invalid URI (while checking 
secureid=)
 ToadletContextImpl.methodNotAllowed=HTTP Method Not Allowed
 ToadletContextImpl.noContentLengthInPOST=No content-length in POST
 ToadletContextImpl.noSuchToadlet=No Toadlet of that name

Modified: trunk/freenet/src/freenet/node/Announcer.java
===================================================================
--- trunk/freenet/src/freenet/node/Announcer.java       2009-01-21 13:59:00 UTC 
(rev 25183)
+++ trunk/freenet/src/freenet/node/Announcer.java       2009-01-21 14:19:01 UTC 
(rev 25184)
@@ -16,7 +16,6 @@
 import java.util.List;
 import java.util.Vector;

-import freenet.clients.http.LinkFixer;
 import freenet.io.comm.PeerParseException;
 import freenet.io.comm.ReferenceSignatureVerificationException;
 import freenet.l10n.L10n;
@@ -543,7 +542,7 @@
                        return L10n.getString("UserAlert.hide");
                }

-               public HTMLNode getHTMLText(LinkFixer fixer) {
+               public HTMLNode getHTMLText() {
                        return new HTMLNode("#", getText());
                }


Modified: trunk/freenet/src/freenet/node/DarknetPeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/DarknetPeerNode.java 2009-01-21 13:59:00 UTC 
(rev 25183)
+++ trunk/freenet/src/freenet/node/DarknetPeerNode.java 2009-01-21 14:19:01 UTC 
(rev 25184)
@@ -16,7 +16,6 @@
 import java.util.LinkedHashSet;

 import freenet.client.DefaultMIMETypes;
-import freenet.clients.http.LinkFixer;
 import freenet.crypt.BlockCipher;
 import freenet.io.comm.DMT;
 import freenet.io.comm.DisconnectedException;
@@ -938,7 +937,7 @@
                                        return L10n.getString("UserAlert.hide");
                                }
                                @Override
-                               public HTMLNode getHTMLText(LinkFixer fixer) {
+                               public HTMLNode getHTMLText() {
                                        HTMLNode div = new HTMLNode("div");

                                        div.addChild("p", 
l10n("failedReceiveHeader", new String[] { "filename", "node" },
@@ -1049,7 +1048,7 @@
                                        return L10n.getString("UserAlert.hide");
                                }
                                @Override
-                               public HTMLNode getHTMLText(LinkFixer fixer) {
+                               public HTMLNode getHTMLText() {
                                        HTMLNode div = new HTMLNode("div");

                                        // FIXME localise!!!
@@ -1163,7 +1162,7 @@
                                        return null; // Cannot hide, but can 
reject
                                }
                                @Override
-                               public HTMLNode getHTMLText(LinkFixer fixer) {
+                               public HTMLNode getHTMLText() {
                                        HTMLNode div = new HTMLNode("div");

                                        div.addChild("p", 
l10n("offeredFileHeader", "name", getName()));

Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java        2009-01-21 
13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java        2009-01-21 
14:19:01 UTC (rev 25184)
@@ -12,7 +12,6 @@
 import java.util.LinkedList;

 import net.i2p.util.NativeBigInteger;
-import freenet.clients.http.LinkFixer;
 import freenet.crypt.BlockCipher;
 import freenet.crypt.DSA;
 import freenet.crypt.DSAGroup;
@@ -2693,7 +2692,7 @@
                        return l10n("somePeersDisconnectedStillNotAcked", 
"count", Integer.toString(sz));
                }

-               public HTMLNode getHTMLText(LinkFixer fixer) {
+               public HTMLNode getHTMLText() {
                        HTMLNode div = new HTMLNode("div");
                        Peer[] peers;
                        synchronized(peersWithProblems) {
@@ -2701,7 +2700,7 @@
                        }
                        L10n.addL10nSubstitution(div, 
"FNPPacketMangler.somePeersDisconnectedStillNotAckedDetail", 
                                        new String[] { "count", "link", "/link" 
}
-                                       , new String[] { 
Integer.toString(peers.length), "<a 
href=\""+fixer.fixLink("/?_CHECKED_HTTP_=https://bugs.freenetproject.org/";)+"\">",
 "</a>" });
+                                       , new String[] { 
Integer.toString(peers.length), "<a 
href=\"/?_CHECKED_HTTP_=https://bugs.freenetproject.org/\";>", "</a>" });
                        HTMLNode list = div.addChild("ul");
                        for(Peer peer : peers) {
                                list.addChild("li", peer.toString());

Modified: trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
===================================================================
--- trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2009-01-21 
13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2009-01-21 
14:19:01 UTC (rev 25184)
@@ -7,7 +7,6 @@
 import java.util.Set;
 import java.util.Vector;

-import freenet.clients.http.LinkFixer;
 import freenet.clients.http.filter.GenericReadFilterCallback;
 import freenet.io.AddressTracker;
 import freenet.io.comm.FreenetInetAddress;
@@ -53,7 +52,7 @@
                        return L10n.getString("UserAlert.hide");
                }

-               public HTMLNode getHTMLText(LinkFixer fixer) {
+               public HTMLNode getHTMLText() {
                        HTMLNode div = new HTMLNode("div");
                        String url = 
GenericReadFilterCallback.escapeURL(HTMLEncoder.encode(l10n("portForwardHelpURL")));
                        boolean maybeForwarded = true;
@@ -64,11 +63,11 @@
                        if(portsNotForwarded.length == 1) {
                                L10n.addL10nSubstitution(div, 
"IPDetectorPluginManager.forwardPort"+keySuffix, 
                                                new String[] { "port", "link", 
"/link" }, 
-                                               new String[] { 
Integer.toString(Math.abs(portsNotForwarded[0])), "<a 
href=\""+fixer.fixLink(url)+"\">", "</a>" });
+                                               new String[] { 
Integer.toString(Math.abs(portsNotForwarded[0])), "<a href=\""+url+"\">", 
"</a>" });
                        } else if(portsNotForwarded.length == 2) {
                                L10n.addL10nSubstitution(div, 
"IPDetectorPluginManager.forwardTwoPorts"+keySuffix, 
                                                new String[] { "port1", 
"port2", "link", "/link" }, 
-                                               new String[] { 
Integer.toString(Math.abs(portsNotForwarded[0])), 
Integer.toString(Math.abs(portsNotForwarded[1])), "<a 
href=\""+fixer.fixLink(url)+"\">", "</a>" });
+                                               new String[] { 
Integer.toString(Math.abs(portsNotForwarded[0])), 
Integer.toString(Math.abs(portsNotForwarded[1])), "<a href=\""+url+"\">", 
"</a>" });
                        } else {
                                Logger.error(this, "Unknown number of ports to 
forward: "+portsNotForwarded.length);
                        }
@@ -189,16 +188,16 @@
                }

                @Override
-               public HTMLNode getHTMLText(LinkFixer fixer) {
+               public HTMLNode getHTMLText() {
                        HTMLNode div = new HTMLNode("div");
                        div.addChild("#", super.getText());
                        if(suggestPortForward) {
                                if(portsNotForwarded.length == 1) {
                                        L10n.addL10nSubstitution(div, 
"IPDetectorPluginManager.suggestForwardPortWithLink", new String[] { "link", 
"/link", "port" },
-                                                       new String[] { "<a 
href=\""+fixer.fixLink("/?_CHECKED_HTTP_=http://wiki.freenetproject.org/FirewallAndRouterIssues";)+"\">",
 "</a>", Integer.toString(portsNotForwarded[0]) });
+                                                       new String[] { "<a 
href=\"/?_CHECKED_HTTP_=http://wiki.freenetproject.org/FirewallAndRouterIssues\";>",
 "</a>", Integer.toString(portsNotForwarded[0]) });
                                } else {
                                        L10n.addL10nSubstitution(div, 
"IPDetectorPluginManager.suggestForwardTwoPortsWithLink", new String[] { 
"link", "/link", "port1", "port2" },
-                                                       new String[] { "<a 
href=\""+fixer.fixLink("/?_CHECKED_HTTP_=http://wiki.freenetproject.org/FirewallAndRouterIssues";)+"\">",
 "</a>", Integer.toString(portsNotForwarded[0]), 
Integer.toString(portsNotForwarded[1]) });
+                                                       new String[] { "<a 
href=\"/?_CHECKED_HTTP_=http://wiki.freenetproject.org/FirewallAndRouterIssues\";>",
 "</a>", Integer.toString(portsNotForwarded[0]), 
Integer.toString(portsNotForwarded[1]) });
                                }
                        }
                        return div;
@@ -934,11 +933,11 @@
                return plugins.length > 0;
        }

-       public void addConnectionTypeBox(HTMLNode contentNode, LinkFixer ctx) {
+       public void addConnectionTypeBox(HTMLNode contentNode) {
                if(node.clientCore == null) return;
                if(node.clientCore.alerts == null) return;
                if(proxyAlert.isValid())
-                       
contentNode.addChild(node.clientCore.alerts.renderAlert(proxyAlert, ctx));
+                       
contentNode.addChild(node.clientCore.alerts.renderAlert(proxyAlert));
        }

 }

Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java    2009-01-21 13:59:00 UTC (rev 
25183)
+++ trunk/freenet/src/freenet/node/Node.java    2009-01-21 14:19:01 UTC (rev 
25184)
@@ -37,9 +37,7 @@

 import freenet.client.FetchContext;
 import freenet.clients.http.LinkFixer;
-import freenet.clients.http.NullLinkFixer;
 import freenet.clients.http.SimpleToadletServer;
-import freenet.clients.http.ToadletContainer;
 import freenet.config.EnumerableOptionCallback;
 import freenet.config.FreenetFilePersistentConfig;
 import freenet.config.InvalidConfigValueException;
@@ -1850,7 +1848,7 @@
                                                
.getString("Node.storeSaltHashMigratedShort"), UserAlert.MINOR) {

                                        @Override
-                                       public HTMLNode getHTMLText(LinkFixer 
fixer) {
+                                       public HTMLNode getHTMLText() {
                                                HTMLNode div = new 
HTMLNode("div");
                                                div.addChild("#", 
L10n.getString("Node.storeSaltHashMigrated"));
                                                HTMLNode ul = 
div.addChild("ul");
@@ -2351,11 +2349,11 @@
                                clientCore.alerts.register(new 
AbstractUserAlert(false, null, null, null, null, UserAlert.ERROR, true, null, 
false, null) {

                                        @Override
-                                       public HTMLNode getHTMLText(LinkFixer 
fixer) {
+                                       public HTMLNode getHTMLText() {
                                                HTMLNode n = new 
HTMLNode("div");
                                                L10n.addL10nSubstitution(n, 
"Node.buggyJVMWithLink", 
                                                                new String[] { 
"link", "/link", "version" },
-                                                               new String[] { 
"<a 
href=\""+fixer.fixLink("/?_CHECKED_HTTP_=http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4855795";)+"\">",
 
+                                                               new String[] { 
"<a 
href=\"/?_CHECKED_HTTP_=http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4855795\";>",
                                                                "</a>", 
HTMLEncoder.encode(System.getProperty("java.version")) });
                                                return n;
                                        }
@@ -4055,13 +4053,6 @@
                return routeAccordingToOurPeersLocation && 
Version.lastGoodBuild() >= 1160;
        }

-       public LinkFixer getLinkFilter() {
-               if(clientCore == null) return NullLinkFixer.instance;
-               ToadletContainer container = clientCore.toadletContainer;
-               if(container == null) return NullLinkFixer.instance;
-               return container;
-       }
-
        private volatile long turtleCount;

        /**

Modified: trunk/freenet/src/freenet/node/NodeClientCore.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeClientCore.java  2009-01-21 13:59:00 UTC 
(rev 25183)
+++ trunk/freenet/src/freenet/node/NodeClientCore.java  2009-01-21 14:19:01 UTC 
(rev 25184)
@@ -15,7 +15,6 @@
 import freenet.client.async.USKManager;
 import freenet.client.events.SimpleEventProducer;
 import freenet.clients.http.FProxyToadlet;
-import freenet.clients.http.LinkFixer;
 import freenet.clients.http.SimpleToadletServer;
 import freenet.clients.http.filter.FilterCallback;
 import freenet.clients.http.filter.FoundURICallback;
@@ -1166,10 +1165,10 @@
                return node.getMyName();
        }

-       public FilterCallback createFilterCallback(URI uri, FoundURICallback 
cb, LinkFixer fixer) {
+       public FilterCallback createFilterCallback(URI uri, FoundURICallback 
cb) {
                if(logMINOR)
-                       Logger.minor(this, "Creating filter callback: " + uri + 
", " + cb+" , "+fixer);
-               return new GenericReadFilterCallback(uri, cb, fixer);
+                       Logger.minor(this, "Creating filter callback: " + uri + 
", " + cb);
+               return new GenericReadFilterCallback(uri, cb);
        }

        public int maxBackgroundUSKFetchers() {

Modified: trunk/freenet/src/freenet/node/NodeIPDetector.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeIPDetector.java  2009-01-21 13:59:00 UTC 
(rev 25183)
+++ trunk/freenet/src/freenet/node/NodeIPDetector.java  2009-01-21 14:19:01 UTC 
(rev 25184)
@@ -9,7 +9,6 @@
 import java.util.List;
 import java.util.Map;

-import freenet.clients.http.LinkFixer;
 import freenet.config.InvalidConfigValueException;
 import freenet.config.SubConfig;
 import freenet.io.comm.FreenetInetAddress;
@@ -574,8 +573,8 @@
                node.clientCore.alerts.register(invalidAddressOverrideAlert);
        }

-       public void addConnectionTypeBox(HTMLNode contentNode, LinkFixer ctx) {
-               ipDetectorManager.addConnectionTypeBox(contentNode, ctx);
+       public void addConnectionTypeBox(HTMLNode contentNode) {
+               ipDetectorManager.addConnectionTypeBox(contentNode);
        }

        public boolean noDetectPlugins() {

Modified: trunk/freenet/src/freenet/node/PacketSender.java
===================================================================
--- trunk/freenet/src/freenet/node/PacketSender.java    2009-01-21 13:59:00 UTC 
(rev 25183)
+++ trunk/freenet/src/freenet/node/PacketSender.java    2009-01-21 14:19:01 UTC 
(rev 25184)
@@ -13,7 +13,6 @@

 import org.tanukisoftware.wrapper.WrapperManager;

-import freenet.clients.http.LinkFixer;
 import freenet.io.comm.Peer;
 import freenet.l10n.L10n;
 import freenet.node.useralerts.UserAlert;
@@ -475,7 +474,7 @@
                        return l10n("somePeersDisconnectedBlockedTooLong", 
"count", Integer.toString(sz));
                }

-               public HTMLNode getHTMLText(LinkFixer fixer) {
+               public HTMLNode getHTMLText() {
                        HTMLNode div = new HTMLNode("div");
                        Peer[] peers;
                        synchronized(peersDumpedBlockedTooLong) {
@@ -483,7 +482,7 @@
                        }
                        L10n.addL10nSubstitution(div, 
"PacketSender.somePeersDisconnectedBlockedTooLongDetail", 
                                        new String[] { "count", "link", "/link" 
}
-                                       , new String[] { 
Integer.toString(peers.length), "<a 
href=\""+fixer.fixLink("/?_CHECKED_HTTP_=https://bugs.freenetproject.org/";)+"\">",
 "</a>" });
+                                       , new String[] { 
Integer.toString(peers.length), "<a 
href=\"/?_CHECKED_HTTP_=https://bugs.freenetproject.org/\";>", "</a>" });
                        HTMLNode list = div.addChild("ul");
                        for(Peer peer : peers) {
                                list.addChild("li", peer.toString());

Modified: trunk/freenet/src/freenet/node/SecurityLevels.java
===================================================================
--- trunk/freenet/src/freenet/node/SecurityLevels.java  2009-01-21 13:59:00 UTC 
(rev 25183)
+++ trunk/freenet/src/freenet/node/SecurityLevels.java  2009-01-21 14:19:01 UTC 
(rev 25184)
@@ -6,8 +6,6 @@
 import java.util.ArrayList;

 import freenet.clients.http.ConfigToadlet;
-import freenet.clients.http.LinkFixer;
-import freenet.clients.http.NullLinkFixer;
 import freenet.config.EnumerableOptionCallback;
 import freenet.config.InvalidConfigValueException;
 import freenet.config.NodeNeedRestartException;
@@ -406,7 +404,7 @@
                                return L10n.getString("UserAlert.hide");
                        }

-                       public HTMLNode getHTMLText(LinkFixer fixer) {
+                       public HTMLNode getHTMLText() {
                                HTMLNode div = new HTMLNode("div");
                                HTMLNode ul = div.addChild("ul");
                                ul.addChild("li", 
l10n("userAlertNetworkThreatLevel", "level", 
localisedName(networkThreatLevel)));
@@ -415,7 +413,7 @@
                                div.addChild("br");
                                L10n.addL10nSubstitution(div, 
"SecurityLevels.userAlertExtro",
                                                new String[] { "link", "/link" 
},
-                                               new String[] { "<a 
href=\""+fixer.fixLink("/config/?mode="+ConfigToadlet.MODE_SECURITY_LEVELS)+"\">",
 "</a>" });
+                                               new String[] { "<a 
href=\"/config/?mode="+ConfigToadlet.MODE_SECURITY_LEVELS+"\">", "</a>" });
                                return div;
                        }

@@ -432,7 +430,7 @@
                        }

                        public String getText() {
-                               return 
getHTMLText(NullLinkFixer.instance).getContent();
+                               return getHTMLText().getContent();
                        }

                        public String getTitle() {

Modified: trunk/freenet/src/freenet/node/TextModeClientInterface.java
===================================================================
--- trunk/freenet/src/freenet/node/TextModeClientInterface.java 2009-01-21 
13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/TextModeClientInterface.java 2009-01-21 
14:19:01 UTC (rev 25184)
@@ -31,8 +31,6 @@
 import freenet.client.InsertBlock;
 import freenet.client.InsertException;
 import freenet.client.events.EventDumper;
-import freenet.clients.http.LinkFixer;
-import freenet.clients.http.NullLinkFixer;
 import freenet.clients.http.filter.ContentFilter;
 import freenet.clients.http.filter.ContentFilter.FilterOutput;
 import freenet.crypt.RandomSource;
@@ -353,9 +351,7 @@
        final String content = readLines(reader, false);
        final Bucket data = new ArrayBucket(content.getBytes("UTF-8"));
        try {
-               LinkFixer fixer = n.clientCore.toadletContainer;
-               if(fixer == null) fixer = new NullLinkFixer();
-               FilterOutput output = ContentFilter.filter(data, new 
ArrayBucketFactory(), "text/html", new URI("http://127.0.0.1:8888/";), null, new 
NullLinkFixer());
+               FilterOutput output = ContentFilter.filter(data, new 
ArrayBucketFactory(), "text/html", new URI("http://127.0.0.1:8888/";), null);

                BufferedInputStream bis = new 
BufferedInputStream(output.data.getInputStream());
                while(bis.available() > 0){

Modified: trunk/freenet/src/freenet/node/updater/UpdateOverMandatoryManager.java
===================================================================
--- trunk/freenet/src/freenet/node/updater/UpdateOverMandatoryManager.java      
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/updater/UpdateOverMandatoryManager.java      
2009-01-21 14:19:01 UTC (rev 25184)
@@ -27,7 +27,6 @@
 import freenet.client.async.ClientGetter;
 import freenet.client.async.ClientPutter;
 import freenet.client.async.SimpleBlockSet;
-import freenet.clients.http.LinkFixer;
 import freenet.io.comm.AsyncMessageCallback;
 import freenet.io.comm.DMT;
 import freenet.io.comm.DisconnectedException;
@@ -540,7 +539,7 @@
                }

                @Override
-               public HTMLNode getHTMLText(LinkFixer fixer) {
+               public HTMLNode getHTMLText() {
                        HTMLNode div = new HTMLNode("div");

                        div.addChild("p").addChild("#", l10n("intro"));

Modified: trunk/freenet/src/freenet/node/useralerts/AbstractUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/AbstractUserAlert.java    
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/AbstractUserAlert.java    
2009-01-21 14:19:01 UTC (rev 25184)
@@ -18,7 +18,6 @@

 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.support.HTMLNode;

 /**
@@ -94,7 +93,7 @@
        /**
         * {@inheritDoc}
         */
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {
                return htmlText;
        }


Modified: trunk/freenet/src/freenet/node/useralerts/BuildOldAgeUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/BuildOldAgeUserAlert.java 
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/BuildOldAgeUserAlert.java 
2009-01-21 14:19:01 UTC (rev 25184)
@@ -3,7 +3,6 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.l10n.L10n;
 import freenet.support.HTMLNode;

@@ -36,7 +35,7 @@
        }

        @Override
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {
                return new HTMLNode("div", getText());
        }


Modified: 
trunk/freenet/src/freenet/node/useralerts/ClockProblemDetectedUserAlert.java
===================================================================
--- 
trunk/freenet/src/freenet/node/useralerts/ClockProblemDetectedUserAlert.java    
    2009-01-21 13:59:00 UTC (rev 25183)
+++ 
trunk/freenet/src/freenet/node/useralerts/ClockProblemDetectedUserAlert.java    
    2009-01-21 14:19:01 UTC (rev 25184)
@@ -3,7 +3,6 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.l10n.L10n;
 import freenet.support.HTMLNode;

@@ -43,7 +42,7 @@
        }

        @Override
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {
                return new HTMLNode("div", getText());
        }


Modified: trunk/freenet/src/freenet/node/useralerts/ExtOldAgeUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/ExtOldAgeUserAlert.java   
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/ExtOldAgeUserAlert.java   
2009-01-21 14:19:01 UTC (rev 25184)
@@ -1,6 +1,5 @@
 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.l10n.L10n;
 import freenet.support.HTMLNode;

@@ -28,7 +27,7 @@
        }

        @Override
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {
                return new HTMLNode("div", getText());
        }


Modified: trunk/freenet/src/freenet/node/useralerts/IPUndetectedUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/IPUndetectedUserAlert.java        
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/IPUndetectedUserAlert.java        
2009-01-21 14:19:01 UTC (rev 25184)
@@ -3,7 +3,6 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.config.Option;
 import freenet.config.SubConfig;
 import freenet.l10n.L10n;
@@ -47,10 +46,10 @@
        }

        @Override
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {
                if(node.ipDetector.noDetectPlugins()) {
                        HTMLNode p = new HTMLNode("p");
-                       L10n.addL10nSubstitution(p, 
"IPUndetectedUserAlert.loadDetectPlugins", new String[] { "plugins", 
"/plugins", "config", "/config" }, new String[] { "<a 
href=\""+fixer.fixLink("/plugins/")+"\">", "</a>", "<a 
href=\""+fixer.fixLink("/config/")+"\">", "</a>" });
+                       L10n.addL10nSubstitution(p, 
"IPUndetectedUserAlert.loadDetectPlugins", new String[] { "plugins", 
"/plugins", "config", "/config" }, new String[] { "<a href=\"/plugins/\">", 
"</a>", "<a href=\"/config/\">", "</a>" });
                        return p;
                }
                HTMLNode textNode = new HTMLNode("div");
@@ -59,7 +58,7 @@

                L10n.addL10nSubstitution(textNode, 
"IPUndetectedUserAlert."+(node.ipDetector.isDetecting() ? 
"detectingWithConfigLink" : "unknownAddressWithConfigLink"), 
                                new String[] { "link", "/link" }, 
-                               new String[] { "<a 
href=\""+fixer.fixLink("/config/")+"\">", "</a>" });
+                               new String[] { "<a href=\"/config/\">", "</a>" 
});
                addPortForwardSuggestion(textNode);
                HTMLNode formNode = textNode.addChild("form", new String[] { 
"action", "method" }, new String[] { "/config/", "post" });
                formNode.addChild("input", new String[] { "type", "name", 
"value" }, new String[] { "hidden", "formPassword", 
node.clientCore.formPassword });

Modified: 
trunk/freenet/src/freenet/node/useralerts/InvalidAddressOverrideUserAlert.java
===================================================================
--- 
trunk/freenet/src/freenet/node/useralerts/InvalidAddressOverrideUserAlert.java  
    2009-01-21 13:59:00 UTC (rev 25183)
+++ 
trunk/freenet/src/freenet/node/useralerts/InvalidAddressOverrideUserAlert.java  
    2009-01-21 14:19:01 UTC (rev 25184)
@@ -3,7 +3,6 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.config.Option;
 import freenet.config.SubConfig;
 import freenet.l10n.L10n;
@@ -34,7 +33,7 @@
        }

        @Override
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {
                SubConfig sc = node.config.get("node");
                Option<?> o = sc.getOption("ipAddressOverride");


Modified: 
trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java  
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java  
2009-01-21 14:19:01 UTC (rev 25184)
@@ -3,7 +3,6 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.config.Option;
 import freenet.config.SubConfig;
 import freenet.l10n.L10n;
@@ -38,7 +37,7 @@
        }

        @Override
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {
                SubConfig sc = node.config.get("node");
                Option<?> o = sc.getOption("name");

@@ -51,9 +50,9 @@
                HTMLNode itemNode = listNode.addChild("li");
                itemNode.addChild("span", new String[]{ "class", "title", 
"style" },
                                new String[]{ "configshortdesc", 
L10n.getString("ConfigToadlet.defaultIs", new String[] { "default" }, new 
String[] { o.getDefault() }), 
-                               "cursor: help;" 
}).addChild(L10n.getHTMLNode(o.getShortDesc(), fixer));
+                               "cursor: help;" 
}).addChild(L10n.getHTMLNode(o.getShortDesc()));
                itemNode.addChild("input", new String[] { "type", "class", 
"alt", "name", "value" }, new String[] { "text", "config", o.getShortDesc(), 
"node.name", o.getValueString() });
-               itemNode.addChild("span", "class", 
"configlongdesc").addChild(L10n.getHTMLNode(o.getLongDesc(), fixer));
+               itemNode.addChild("span", "class", 
"configlongdesc").addChild(L10n.getHTMLNode(o.getLongDesc()));
                formNode.addChild("input", new String[] { "type", "value" }, 
new String[] { "submit", L10n.getString("UserAlert.apply") });
                formNode.addChild("input", new String[] { "type", "value" }, 
new String[] { "reset", L10n.getString("UserAlert.reset") });


Modified: trunk/freenet/src/freenet/node/useralerts/N2NTMUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/N2NTMUserAlert.java       
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/N2NTMUserAlert.java       
2009-01-21 14:19:01 UTC (rev 25184)
@@ -6,7 +6,6 @@
 import java.text.DateFormat;
 import java.util.Date;

-import freenet.clients.http.LinkFixer;
 import freenet.l10n.L10n;
 import freenet.node.DarknetPeerNode;
 import freenet.support.HTMLNode;
@@ -53,7 +52,7 @@
        }

        @Override
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {
                HTMLNode alertNode = new HTMLNode("div");
                alertNode.addChild("p",
                                l10n("header", new String[] { "from", 
"composed", "sent", "received" },
@@ -65,7 +64,7 @@
                        if(i != lines.length - 1)
                                alertNode.addChild("br");
                }
-               alertNode.addChild("p").addChild("a", "href", 
fixer.fixLink("/send_n2ntm/?peernode_hashcode=" + sourcePeerNode.hashCode()), 
l10n("reply"));
+               alertNode.addChild("p").addChild("a", "href", 
"/send_n2ntm/?peernode_hashcode=" + sourcePeerNode.hashCode(), l10n("reply"));
                return alertNode;
        }


Modified: 
trunk/freenet/src/freenet/node/useralerts/NotEnoughNiceLevelsUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/NotEnoughNiceLevelsUserAlert.java 
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/NotEnoughNiceLevelsUserAlert.java 
2009-01-21 14:19:01 UTC (rev 25184)
@@ -4,7 +4,6 @@

 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.l10n.L10n;
 import freenet.support.HTMLNode;
 import freenet.support.io.NativeThread;
@@ -41,7 +40,7 @@
        }

        @Override
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {
                return new HTMLNode("div", getText());
        }


Modified: trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java 
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java 
2009-01-21 14:19:01 UTC (rev 25184)
@@ -3,7 +3,6 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.l10n.L10n;
 import freenet.node.NodeStats;
 import freenet.support.HTMLNode;
@@ -175,7 +174,7 @@
        }

        @Override
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {
                HTMLNode alertNode = new HTMLNode("div");

                if (peers == 0 && !isOpennetEnabled) {
@@ -204,7 +203,7 @@
                } else if (neverConn > 
MAX_NEVER_CONNECTED_PEER_ALERT_THRESHOLD) {
                        L10n.addL10nSubstitution(alertNode, 
"PeerManagerUserAlert.tooManyNeverConnectedWithLink",
                                        new String[] { "link", "/link", "count" 
},
-                                       new String[] { "<a 
href=\""+fixer.fixLink("/friends/myref.fref")+"\">", "</a>", 
Integer.toString(neverConn) });
+                                       new String[] { "<a 
href=\"/friends/myref.fref\">", "</a>", Integer.toString(neverConn) });
                } else if(connError > MIN_CONN_ERROR_ALERT_THRESHOLD) {
                        alertNode.addChild("#", l10n("connError", "count", 
Integer.toString(connError)));
                } else if (disconnDarknetPeers > 
MAX_DISCONN_PEER_ALERT_THRESHOLD && !darknetDefinitelyPortForwarded && 
!darknetAssumeNAT) {

Modified: trunk/freenet/src/freenet/node/useralerts/ProxyUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/ProxyUserAlert.java       
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/ProxyUserAlert.java       
2009-01-21 14:19:01 UTC (rev 25184)
@@ -1,6 +1,5 @@
 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.support.HTMLNode;

 /**
@@ -45,8 +44,8 @@
                return alert.getText();
        }

-       public HTMLNode getHTMLText(LinkFixer fixer) {
-               return alert.getHTMLText(fixer);
+       public HTMLNode getHTMLText() {
+               return alert.getHTMLText();
        }

        public short getPriorityClass() {

Modified: 
trunk/freenet/src/freenet/node/useralerts/TimeSkewDetectedUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/TimeSkewDetectedUserAlert.java    
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/TimeSkewDetectedUserAlert.java    
2009-01-21 14:19:01 UTC (rev 25184)
@@ -3,7 +3,6 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.l10n.L10n;
 import freenet.support.HTMLNode;

@@ -44,7 +43,7 @@
        }

        @Override
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {
                return new HTMLNode("div", getText());
        }


Modified: 
trunk/freenet/src/freenet/node/useralerts/UpdatedVersionAvailableUserAlert.java
===================================================================
--- 
trunk/freenet/src/freenet/node/useralerts/UpdatedVersionAvailableUserAlert.java 
    2009-01-21 13:59:00 UTC (rev 25183)
+++ 
trunk/freenet/src/freenet/node/useralerts/UpdatedVersionAvailableUserAlert.java 
    2009-01-21 14:19:01 UTC (rev 25184)
@@ -3,7 +3,6 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.l10n.L10n;
 import freenet.node.updater.NodeUpdateManager;
 import freenet.node.updater.RevocationChecker;
@@ -76,7 +75,7 @@
        }

        @Override
-       public HTMLNode getHTMLText(LinkFixer fixer) {
+       public HTMLNode getHTMLText() {

                UpdateThingy ut = createUpdateThingy();


Modified: trunk/freenet/src/freenet/node/useralerts/UserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/UserAlert.java    2009-01-21 
13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/UserAlert.java    2009-01-21 
14:19:01 UTC (rev 25184)
@@ -3,7 +3,6 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.node.useralerts;

-import freenet.clients.http.LinkFixer;
 import freenet.support.HTMLNode;

 public interface UserAlert {
@@ -27,7 +26,7 @@
        /**
         * Content of alert (HTML).
         */
-       public HTMLNode getHTMLText(LinkFixer fixer);
+       public HTMLNode getHTMLText();

        /**
         * *Really* concise text of alert. Should be comfortably under a line 
even when translated

Modified: trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java     
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java     
2009-01-21 14:19:01 UTC (rev 25184)
@@ -8,8 +8,6 @@
 import java.util.HashSet;
 import java.util.LinkedHashSet;

-import freenet.clients.http.LinkFixer;
-import freenet.clients.http.ToadletContext;
 import freenet.l10n.L10n;
 import freenet.node.NodeClientCore;
 import freenet.support.HTMLNode;
@@ -103,7 +101,7 @@
        /**
         * Write the alerts as HTML.
         */
-       public HTMLNode createAlerts(LinkFixer fixer) {
+       public HTMLNode createAlerts() {
                HTMLNode alertsNode = new HTMLNode("div");
                UserAlert[] alerts = getAlerts();
                int totalNumber = 0;
@@ -113,7 +111,7 @@
                                continue;
                        totalNumber++;
                        alertsNode.addChild("a", "name", alert.anchor());
-                       alertsNode.addChild(renderAlert(alert, fixer));
+                       alertsNode.addChild(renderAlert(alert));
                }
                if (totalNumber == 0) {
                        return new HTMLNode("#", "");
@@ -125,7 +123,7 @@
         * Write each alert in uber-concise form as HTML, with a link to 
         * /alerts/[ anchor pointing to the real alert].
         */
-       public HTMLNode createAlertsShort(String title, boolean advancedMode, 
boolean drawDumpEventsForm, ToadletContext ctx) {
+       public HTMLNode createAlertsShort(String title, boolean advancedMode, 
boolean drawDumpEventsForm) {
                UserAlert[] currentAlerts = getAlerts();
                short maxLevel = Short.MAX_VALUE;
                int events = 0;
@@ -151,7 +149,7 @@
                        if (!alert.isValid())
                                continue;
                        HTMLNode listItem = alertsNode.addChild("li", "class", 
"alert-summary-text-"+getAlertLevelName(alert.getPriorityClass()));
-                       listItem.addChild("a", "href", 
ctx.fixLink("/alerts/#"+alert.anchor()), alert.getShortText());
+                       listItem.addChild("a", "href", 
"/alerts/#"+alert.anchor(), alert.getShortText());
                        totalNumber++;
                }
                if(drawDumpEventsForm) {
@@ -177,14 +175,14 @@
         *            The user alert to render
         * @return The rendered HTML node
         */
-       public HTMLNode renderAlert(UserAlert userAlert, LinkFixer fixer) {
+       public HTMLNode renderAlert(UserAlert userAlert) {
                HTMLNode userAlertNode = null;
                short level = userAlert.getPriorityClass();
                userAlertNode = new HTMLNode("div", "class", "infobox 
infobox-"+getAlertLevelName(level));

                userAlertNode.addChild("div", "class", "infobox-header", 
userAlert.getTitle());
                HTMLNode alertContentNode = userAlertNode.addChild("div", 
"class", "infobox-content");
-               alertContentNode.addChild(userAlert.getHTMLText(fixer));
+               alertContentNode.addChild(userAlert.getHTMLText());
                if (userAlert.userCanDismiss()) {
                        HTMLNode dismissFormNode = 
alertContentNode.addChild("form", new String[] { "action", "method" }, new 
String[] { "/", "post" }).addChild("div");
                        dismissFormNode.addChild("input", new String[] { 
"type", "name", "value" }, new String[] { "hidden", "disable", 
String.valueOf(userAlert.hashCode()) });
@@ -212,7 +210,7 @@
        /**
         * Write the alert summary as HTML to a StringBuilder
         */
-       public HTMLNode createSummary(LinkFixer fixer) {
+       public HTMLNode createSummary() {
                short highestLevel = 99;
                int numberOfCriticalError = 0;
                int numberOfError = 0;
@@ -290,7 +288,7 @@
                summaryContent.addChild("#", " ");
                L10n.addL10nSubstitution(summaryContent, 
"UserAlertManager.alertsOnAlertsPage",
                                new String[] { "link", "/link" },
-                               new String[] { "<a 
href=\""+fixer.fixLink("/alerts/")+"\">", "</a>" });
+                               new String[] { "<a href=\"/alerts/\">", "</a>" 
});
                return summaryBox;
        }


Modified: trunk/freenet/src/freenet/pluginmanager/PluginRespirator.java
===================================================================
--- trunk/freenet/src/freenet/pluginmanager/PluginRespirator.java       
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/pluginmanager/PluginRespirator.java       
2009-01-21 14:19:01 UTC (rev 25184)
@@ -3,7 +3,6 @@
 import java.net.URISyntaxException;

 import freenet.client.HighLevelSimpleClient;
-import freenet.clients.http.NullLinkFixer;
 import freenet.clients.http.PageMaker;
 import freenet.clients.http.filter.FilterCallback;
 import freenet.node.Node;
@@ -40,7 +39,7 @@

        public FilterCallback makeFilterCallback(String path) {
                try {
-                       return 
node.clientCore.createFilterCallback(URIPreEncoder.encodeURI(path), null, 
node.getLinkFilter());
+                       return 
node.clientCore.createFilterCallback(URIPreEncoder.encodeURI(path), null);
                } catch (URISyntaxException e) {
                        throw new Error(e);
                }

Modified: trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java      
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java      
2009-01-21 14:19:01 UTC (rev 25184)
@@ -29,7 +29,6 @@
 import org.spaceroots.mantissa.random.MersenneTwister;
 import org.tanukisoftware.wrapper.WrapperManager;

-import freenet.clients.http.LinkFixer;
 import freenet.keys.KeyVerifyException;
 import freenet.l10n.L10n;
 import freenet.node.SemiOrderedShutdownHook;
@@ -1418,7 +1417,7 @@
                        return L10n.getString("UserAlert.hide");
                }

-               public HTMLNode getHTMLText(LinkFixer fixer) {
+               public HTMLNode getHTMLText() {
                        return new HTMLNode("#", getText());
                }


Modified: trunk/freenet/src/freenet/support/URLEncoder.java
===================================================================
--- trunk/freenet/src/freenet/support/URLEncoder.java   2009-01-21 13:59:00 UTC 
(rev 25183)
+++ trunk/freenet/src/freenet/support/URLEncoder.java   2009-01-21 14:19:01 UTC 
(rev 25184)
@@ -62,48 +62,4 @@
                return encode(s, null, ascii);
        }

-       /**
-        * Encode only % and those characters in the encode list.
-        * @param encode Characters that must be encoded (as well as %).
-        * @return
-        */
-       public static String minimalEncode(String URL, String force) {
-               // First check that we need to encode.
-               boolean needed = false;
-               if(URL.indexOf('%') > -1) needed = true;
-               if(!needed) {
-                       for(int i=0;i<URL.length();i++) {
-                               char c = URL.charAt(i);
-                               if(force.indexOf(c) > -1) {
-                                       needed = true;
-                                       break;
-                               }
-                       }
-               }
-               if(!needed) return URL;
-               StringBuilder enc = new StringBuilder(URL.length());
-               for (int i = 0; i < URL.length(); ++i) {
-                       char c = URL.charAt(i);
-                       if(c != '%' && force.indexOf(c) < 0) {
-                               enc.append(c);
-                       } else {
-                               try {
-                                       byte[] encoded = ("" + 
c).getBytes("UTF-8");
-                                       for (int j = 0; j < encoded.length; 
j++) {
-                                               byte b = encoded[j];
-                                               int x = b & 0xFF;
-                                               if (x < 16)
-                                                       enc.append("%0");
-                                               else
-                                                       enc.append('%');
-                                               
enc.append(Integer.toHexString(x));
-                                       }
-                               } catch (UnsupportedEncodingException e) {
-                                       throw new Error("Impossible: JVM 
doesn't support UTF-8: " + e, e);
-                               }
-                       }
-               }
-               return enc.toString();
-       }
-
 }

Modified: trunk/freenet/test/freenet/clients/http/filter/ContentFilterTest.java
===================================================================
--- trunk/freenet/test/freenet/clients/http/filter/ContentFilterTest.java       
2009-01-21 13:59:00 UTC (rev 25183)
+++ trunk/freenet/test/freenet/clients/http/filter/ContentFilterTest.java       
2009-01-21 14:19:01 UTC (rev 25184)
@@ -6,7 +6,6 @@
 import java.net.URI;

 import junit.framework.TestCase;
-import freenet.clients.http.NullLinkFixer;
 import freenet.support.api.BucketFactory;
 import freenet.support.io.ArrayBucket;
 import freenet.support.io.ArrayBucketFactory;
@@ -92,6 +91,6 @@
                URI baseURI = new URI(BASE_URI);
                byte[] dataToFilter = data.getBytes("UTF-8");

-               return ContentFilter.filter(new ArrayBucket(dataToFilter), bf, 
typeName, baseURI, null, NullLinkFixer.instance).data.toString();
+               return ContentFilter.filter(new ArrayBucket(dataToFilter), bf, 
typeName, baseURI, null).data.toString();
        }
 }


Reply via email to