escapeXml
function is converting ѭ Ѯ
to ѭ Ѯ
which I guess it should not. What I read is that it Supports only the five basic XML entities (gt
, lt
, quot
, amp
, apos
).
Is there a function that only converts these five basic xml entities?
public String escapeXml(String s) {
return s.replaceAll("&", "&").replaceAll(">", ">").replaceAll("<", "<").replaceAll("\"", """).replaceAll("'", "'");
}