fix ugliness in release history of help.jsp
[yes, i am still alive *g*]
This commit is contained in:
@ -51,7 +51,19 @@ public class ContentHelper {
|
|||||||
String str = FileUtil.readTextFile(_page, _maxLines, _startAtBeginning);
|
String str = FileUtil.readTextFile(_page, _maxLines, _startAtBeginning);
|
||||||
if (str == null)
|
if (str == null)
|
||||||
return "";
|
return "";
|
||||||
else
|
else {
|
||||||
return "<pre>" + str + "</pre>";
|
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("<"); break;
|
||||||
|
case '>': sb.append(">"); break;
|
||||||
|
case '&': sb.append("&"); break;
|
||||||
|
default: sb.append(c); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sb.append("</pre>").toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user