Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Within our project data is read from a database and displayed via the displaytag table.
The escapeXml="true" is set for the column tag.
We expected to have data " Name" to be escaped into " Name".
Is it possible to have the escapeXml working for space? This doesn't happen.
Note:
It looks like only the & " en ' are transformed to there respective & " en ' No other characters are escaped.
The possibility of having a global (configuration) setting for the escapXml (like the defaultHtmlEscape of Spring) would be great!
The escapeXml="true" is set for the column tag.
We expected to have data " Name" to be escaped into " Name".
Is it possible to have the escapeXml working for space? This doesn't happen.
Note:
It looks like only the & " en ' are transformed to there respective & " en ' No other characters are escaped.
The possibility of having a global (configuration) setting for the escapXml (like the defaultHtmlEscape of Spring) would be great!
if a seperated call to the escapeHtml can be made for HTML, a lot more (in effect all html 4.0) will be escaped, according to the javadoc of the StringEscapeUtils class. Hopes this helps
<snippet could be added to the EscapeXmlColumnDecorator.java class>
if (media.equals(MediaTypeEnum.XML)) {
return StringEscapeUtils.escapeXml(columnValue.toString());
}
if (media.equals(MediaTypeEnum.HTML)) {
return StringEscapeUtils.escapeHtml(columnValue.toString());
}