mirror of
https://github.com/apache/activemq.git
synced 2025-02-09 03:25:33 +00:00
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.escapeHtml(text);
|
||||||
text = org.apache.commons.lang.StringEscapeUtils.escapeJavaScript(text);
|
text = org.apache.commons.lang.StringEscapeUtils.escapeJavaScript(text);
|
||||||
if (length == null)
|
if (length == null || length < 20)
|
||||||
length = 20;
|
length = 20;
|
||||||
if (text.length() <= length) {
|
if (text.length() <= length) {
|
||||||
out.print(text);
|
out.print(text);
|
||||||
} else {
|
} 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…
x
Reference in New Issue
Block a user