if(logMINOR) Logger.minor(this, "Failed to parse URI: "+e1);
throw new CommentException(l10n("couldNotParseURIWithError", "error", e1.getMessage()));
}
String path = uri.getPath();
HTTPRequest req = new HTTPRequestImpl(uri, "GET");
if (path != null) {
if (path.equals("/") && req.isParameterSet("newbookmark") && !forBaseHref) {
// allow links to the root to add bookmarks
String bookmark_key = req.getParam("newbookmark");
String bookmark_desc = req.getParam("desc");
String bookmark_activelink = req.getParam("hasAnActivelink", "");
try {
FreenetURI furi = new FreenetURI(bookmark_key);
bookmark_key = furi.toString();
bookmark_desc = URLEncoder.encode(bookmark_desc, "UTF-8");