mirror of https://github.com/apache/activemq.git
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:
parent
b489fc6f75
commit
4321ae065d
|
@ -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));
|
||||
}
|
||||
%>
|
Loading…
Reference in New Issue