You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for example the String 馃┏ leads to the XML-Entity: �� which is according to XML-Spec (https://www.w3.org/TR/REC-xml/#NT-Char) not in the range of allowed chars for XML (Note the ranges differ between XML 1.0 and XML 1.1)
This should either be:
fixed (don't know what would be the right way?) perhaps raising an error or rejecting the input? Filtering offending chars would also be an option
documented
Im not shure if for an UTF-8 encoded XML document the encoding of <, >," and ' would be sufficent and all other characters should be passed through
The text was updated successfully, but these errors were encountered:
No it is hex encoding the value, but the 馃┏ is in its encoded form (��) not valid for XML (see the linked spec) I'm not sure if it is legal in unencoded form for UTF-8 encoded xml files
The emoji is encoded in the Java String as two chars due to the code point being over the two byte limit, hence the strange encoded form. It's called a surrogate pair. The fix would be to loop over the code points instead of the characters of the string. I'll make a PR in a bit.
StringRenderer
xml-encode
leads to invalid xmlfor example the String
馃┏
leads to the XML-Entity:��
which is according to XML-Spec (https://www.w3.org/TR/REC-xml/#NT-Char) not in the range of allowed chars for XML (Note the ranges differ between XML 1.0 and XML 1.1)This should either be:
Im not shure if for an UTF-8 encoded XML document the encoding of
<
,>
,"
and'
would be sufficent and all other characters should be passed throughThe text was updated successfully, but these errors were encountered: