From e441831a2491d111e6027f0006aa759e4cba742e Mon Sep 17 00:00:00 2001 From: orbiter Date: Mon, 21 Jul 2014 15:58:29 +0200 Subject: [PATCH] reverted toString() change in AnchorURL to prevent mistakenly used toString(). This fixes also the update link bug. --- htroot/ConfigUpdate_p.java | 2 +- source/net/yacy/cora/document/id/AnchorURL.java | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htroot/ConfigUpdate_p.java b/htroot/ConfigUpdate_p.java index c3f6a58d0..2996e1386 100644 --- a/htroot/ConfigUpdate_p.java +++ b/htroot/ConfigUpdate_p.java @@ -228,7 +228,7 @@ public class ConfigUpdate_p { for (int i = rlist.size() - 1; i >= 0; i--) { release = rlist.get(i); prop.put("candeploy_availreleases_" + relcount + "_name", ((release.isMainRelease()) ? "main" : "dev") + " " + release.getReleaseNr() + "/" + release.getSvn()); - prop.put("candeploy_availreleases_" + relcount + "_url", release.getUrl().toString()); + prop.put("candeploy_availreleases_" + relcount + "_url", release.getUrl().toNormalform(false)); prop.put("candeploy_availreleases_" + relcount + "_signatures", (release.getPublicKey()!=null?"1":"0")); prop.put("candeploy_availreleases_" + relcount + "_selected", (relcount == 0) ? "1" : "0"); relcount++; diff --git a/source/net/yacy/cora/document/id/AnchorURL.java b/source/net/yacy/cora/document/id/AnchorURL.java index fc05853b7..ea53de6cf 100644 --- a/source/net/yacy/cora/document/id/AnchorURL.java +++ b/source/net/yacy/cora/document/id/AnchorURL.java @@ -131,12 +131,16 @@ public class AnchorURL extends DigestURL { return this.relProperty.indexOf("nofollow") >= 0; } - @Override - public String toString() { + public String toHTML() { return " 0 ? (" name=\"" + this.nameProperty + "\"") : "") + (this.relProperty.length() > 0 ? (" rel=\"" + this.relProperty + "\"") : "") + ">" + this.textProperty + ""; } + @Override + public String toString() { + return this.toNormalform(false); + } + }