-
-
Notifications
You must be signed in to change notification settings - Fork 357
Closed
Labels
PendingPending to be confirmed by user/author for some check/update/implementationPending to be confirmed by user/author for some check/update/implementation
Description
- Are you running the latest version?
- Have you included sample input, output, error, and expected output?
- Have you checked if you are using correct configuration?
- Did you try online tool?
Description
Trying to parse comments containing '<' or '>' inside the DOCTYPE markup declaration list results in errors. The errors are different depending on whether '<' or '>' was used (or which appears first). This is not an issue if the comment is elsewhere in the file.
Code and output
const xmlStr = `
<!DOCTYPE greeting [
<!-- < -->
<!ELEMENT greeting (#PCDATA)>
]>
<greeting>Hello, world!</greeting>
`
const parser = new fxparser.XMLParser();
const output = parser.parse(xmlStr);out:
Uncaught Error: Invalid DOCTYPE
readDocType DocTypeReader.js:73
parseXml OrderedObjParser.js:245
parse XMLParser.js:35
DocTypeReader.js:73:26
const xmlStr = `
<!DOCTYPE greeting [
<!-- > -->
<!ELEMENT greeting (#PCDATA)>
]>
<greeting>Hello, world!</greeting>
`
const parser = new fxparser.XMLParser();
const output = parser.parse(xmlStr);out:
Uncaught Error: Invalid XML comment in DOCTYPE
readDocType DocTypeReader.js:82
parseXml OrderedObjParser.js:245
parse XMLParser.js:35
DocTypeReader.js:82:30
Probably not important, but I feel I should note that while the online version still throws errors, the error messages are different. '<' and '>' throw Error: Start tag expected.:1:undefined and Error: char 'E' is not expected.:3:5 respectively.
Would you like to work on this issue?
- Yes
- No
Bookmark this repository for further updates.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PendingPending to be confirmed by user/author for some check/update/implementationPending to be confirmed by user/author for some check/update/implementation