I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit dc0485b5 authored by mihi's avatar mihi Committed by zzz
Browse files

fix ugliness in release history of help.jsp

[yes, i am still alive *g*]
parent 784d465d
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,19 @@ public class ContentHelper {
String str = FileUtil.readTextFile(_page, _maxLines, _startAtBeginning);
if (str == null)
return "";
else
return "<pre>" + str + "</pre>";
else {
StringBuffer sb = new StringBuffer(str.length()+11);
sb.append("<pre>");
for (int i=0; i < str.length(); i++) {
char c = str.charAt(i);
switch (str.charAt(i)) {
case '<': sb.append("&lt;"); break;
case '>': sb.append("&gt;"); break;
case '&': sb.append("&amp;"); break;
default: sb.append(c); break;
}
}
return sb.append("</pre>").toString();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment