Just as an FYI, since I'm using Commons Lang in other places, I've
changed to doing the encoding in my Java code using
org.apache.commons.lang3.StringEscapeUtils.escapeHtml4() which also
encodes other HTML entities in addition to ", &, <, >
and &#xxxx;
Mat.