Fix the truncation logic to ensure all possible text is used.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1417998 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-12-06 16:49:32 +00:00
parent b489fc6f75
commit 4321ae065d
1 changed files with 2 additions and 2 deletions

View File

@ -19,11 +19,11 @@
<%
text = org.apache.commons.lang.StringEscapeUtils.escapeHtml(text);
text = org.apache.commons.lang.StringEscapeUtils.escapeJavaScript(text);
if (length == null)
if (length == null || length < 20)
length = 20;
if (text.length() <= length) {
out.print(text);
} else {
out.println(text.substring(0, 10) + "..." + text.substring(text.length() - 5));
out.println(text.substring(0, (length-10)) + "..." + text.substring(text.length() - 5));
}
%>