At the moment, LinearDoc.js will accept ill-formed XML containing syntax like <!--- foo ----> , which then gets misinterpreted.
For example, the document '<p>foo<!-- bar -->baz</p>' correctly gives the following LinearDoc (XML dump):
<p> <cxtextblock> <cxtextchunk>foo</cxtextchunk> <cxtextchunk>baz</cxtextchunk> </cxtextblock> </p>
However, the ill-formed document '<p>foo<!--- bar ---->baz</p>' gives the following LinearDoc (XML dump):
<p>
The expected behaviour is to signal an XML parser error on reading the ill-formed document.
This bug occurs because the nodejs sax 0.6.0 module silently accepts ill-formed XML, which violates 5.1 of http://www.w3.org/TR/REC-xml/ ("Validating and non-validating processors alike must report violations of this specification's well-formedness constraints").
Version: unspecified
Severity: minor