Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
It appears that displaytag escapes (when escapeXml="true") a single quote with '
c:out and bean:write tags escape it with '
The problem is that while Firefox and Safari understand ', Internet Explorer does not. All three browsers understand '.
This means that all single quotes in displaytag tables will appear as ugly "'".
This might be related to issue: maven-83: xdocs entity encoding problem for single quote
If there is a known workaround, could you let me know? thanks.
c:out and bean:write tags escape it with '
The problem is that while Firefox and Safari understand ', Internet Explorer does not. All three browsers understand '.
This means that all single quotes in displaytag tables will appear as ugly "'".
This might be related to issue: maven-83: xdocs entity encoding problem for single quote
If there is a known workaround, could you let me know? thanks.
So:
// escape the contents
returnValue = StringEscapeUtils.escapeXml(columnValue.toString());
// because IE doesn't understand ' we replace with '
if (StringUtils.contains(returnValue.toString(), "'")) {
// tis found
returnValue =
StringUtils.replace(
returnValue.toString(),
"'",
"'");
}
then in the jsp, instead of using escapeXml="true", you need to do decorator="foo.blah.myclass"