Author: toad
Date: 2007-07-06 21:20:37 +0000 (Fri, 06 Jul 2007)
New Revision: 13972
Modified:
trunk/freenet/src/freenet/node/DarknetPeerNode.java
Log:
Split up by newlines for HTML
Modified: trunk/freenet/src/freenet/node/DarknetPeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/DarknetPeerNode.java 2007-07-06 20:49:36 UTC
(rev 13971)
+++ trunk/freenet/src/freenet/node/DarknetPeerNode.java 2007-07-06 21:20:37 UTC
(rev 13972)
@@ -921,7 +921,7 @@
row = table.addChild("tr");
if(comment != null && comment.length()
> 0) {
row.addChild("td").addChild("#", l10n("commentLabel"));
-
row.addChild("td").addChild("#", comment);
+ addComment(row.addChild("td"));
}
return div;
@@ -1019,7 +1019,7 @@
row = table.addChild("tr");
if(comment != null && comment.length()
> 0) {
row.addChild("td").addChild("#", l10n("commentLabel"));
-
row.addChild("td").addChild("#", comment);
+ addComment(row.addChild("td"));
}
return div;
@@ -1116,7 +1116,7 @@
row = table.addChild("tr");
if(comment != null && comment.length()
> 0) {
row.addChild("td").addChild("#", l10n("commentLabel"));
-
row.addChild("td").addChild("#", comment);
+ addComment(row.addChild("td"));
}
// Accept/reject form
@@ -1196,6 +1196,13 @@
};
}
+ protected void addComment(HTMLNode node) {
+ String[] lines = comment.split("\n");
+ for (int i = 0, c = lines.length; i < c; i++) {
+ node.addChild("div", lines[i]);
+ }
+ }
+
private String l10n(String key) {
return L10n.getString("FileOffer."+key);
}