On 21.12.19 12:32, Andrew Nenakhov wrote:
> 
> 
> сб, 21 дек. 2019 г. в 16:21, Ralph Meijer <ral...@ik.nu
> <mailto:ral...@ik.nu>>:
> 
>     Just making sure everyone has the same interpretation:
> 
>     Case 1) The text has the sequence ]]>. In this case, in XML the >
>     MUST be escaped (with &gt;, or equivalent character reference).
>     Case 2) All occurances of > not preceded by ]]. Here > MAY appear
>     as-is, or escaped. Both are valid.
> 
> 
> Well. We diverge here, and read it differently. MUST be escaped clause
> uses AND, it's is not optiona. The reason it MUST be escaped is _for
> compatibility_, and we are in a compatibility game, aren't we?
> 
> For argument's sake, can you provide examples of XML processing
> libraries that work the way you describe and do not escape > all the
> time? We know none such, and we've tested dozens of them over the many
> years. Every single one always did the escaping. As I think it should,
> because consistency.

Smack does not escape all the time:
https://github.com/igniterealtime/Smack/blob/9d626bf787dc3e0e0a4399cef429285b22744d73/smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L194

Also xmllint says that '>' in text is well-formed.

$ echo "<example>></example>" | xmllint --noout -

$ echo "<example><</example>" | xmllint --noout -
-:1: parser error : StartTag: invalid element name
<example><</example>
          ^
- Flrian

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: standards-unsubscr...@xmpp.org
_______________________________________________

Reply via email to