mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 13:33:19 +00:00
An XML declaration at the start of XML or XMLList text was skipped up to the next "?>" without being read. It is now checked against XML 1.0's grammar (https://www.w3.org/TR/xml/#NT-XMLDecl): a version of "1." and digits, then an optional encoding name and an optional standalone "yes" or "no", in that order, with optional white space before "?>". Any other declaration gives "SyntaxError: invalid XML declaration", and a character XML does not allow gives "invalid character in XML text". White space before the declaration is still accepted. The parser now takes fuel for the length of the declaration and the white space before it, element and attribute names, white space in open and closing tags, and the text it searched when an attribute value, CDATA section, comment or processing instruction is not closed, or when "]]>" or "<" stops a text run or attribute value. A long run in any of these used the same fuel as a short one.