Ticket #1001274: Check ampersand in grid view

This commit is contained in:
Elaine Tan 2012-08-24 12:54:12 +08:00
parent 0ba74f0e13
commit 283d5c97e0
1 changed files with 3 additions and 2 deletions

View File

@ -259,8 +259,9 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
String display = text;
if (text != null && text.length() > MAX_TEXT_LENGTH)
display = text.substring(0, MAX_TEXT_LENGTH - 3) + "...";
if (display != null)
display = XMLs.encodeText(display);
// since 5.0.8, the org.zkoss.zhtml.Text is encoded by default
// if (display != null)
// display = XMLs.encodeText(display);
label.appendChild(new Text(display));
if (text != null && text.length() > MAX_TEXT_LENGTH)
label.setDynamicProperty("title", text);