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
{{ message }}
Repository navigation
XMLValidator accepts a literal ]]> in element text #901
Have you checked the docs for helpful APIs and examples?
Description
On 5.11.2 (current master at cf66a9658004553bc740616e6c7a4912e7e9aab6), XMLValidator accepts a literal ]]> in element text. The XML 1.0 CharData grammar excludes that sequence except when it closes a CDATA section.
Input
<a>]]></a> is the invalid input. <a>]]></a> is a valid control representing the same text.
Both inputs return true from XMLValidator.validate; both parse with validation enabled as { a: ']]>' }. The online validator also reports “Valid XML” for the raw input. Python xml.etree.ElementTree rejects the raw input with ParseError at column 5 and accepts the escaped control.
Expected data
The raw delimiter should be rejected by validation (including parsing with validation=true), while the escaped control should remain valid.
I checked the separate fast-xml-validatorSyntaxValidator.validate on main at 335fcaf (package.json 1.4.2, Node 24.22.1). It returns true for the malformed <a>]]></a> and also for the valid escaped control <a>]]></a>. This case reproduces in the separate validator.
Activity
amitguptagwl commentedon Nov 3, 2026
plz check fast-xml-validator once
agammann commentedon Nov 4, 2026
I checked the separate
fast-xml-validatorSyntaxValidator.validateon main at335fcaf(package.json1.4.2, Node 24.22.1). It returnstruefor the malformed<a>]]></a>and also for the valid escaped control<a>]]></a>. This case reproduces in the separate validator.