Description
According to this XML spec, character references can include leading zeros and lower-case letters in hexadecimal representation.
Personally I encountered this parsing issue by consuming XML provided by a proprietary third-party tool, which includes references in the style of <.
Input
<?xml version="1.0"?>
<tests>
<test><</test>
<test><</test>
<test><</test>
<test><</test>
<test><</test>
<test><</test>
<test><</test>
<test><</test>
<test><</test>
<test><</test>
</tests>
Code
const parser = new XMLParser();
let result = parser.parse(xmlData, true);
Output
{
"?xml": "",
"tests": {
"test": [
"<",
"<",
"<",
"<",
"<",
"<",
"<",
"<",
"<",
"<"
]
}
}
expected data
{
"?xml": "",
"tests": {
"test": [
"<",
"<",
"<",
"<",
"<",
"<",
"<",
"<",
"<",
"<",
]
}
}
Would you like to work on this issue?
Bookmark this repository for further updates. Visit SoloThought to know about recent features.
Description
According to this XML spec, character references can include leading zeros and lower-case letters in hexadecimal representation.
Personally I encountered this parsing issue by consuming XML provided by a proprietary third-party tool, which includes references in the style of
<.Input
Code
Output
{ "?xml": "", "tests": { "test": [ "<", "<", "<", "<", "<", "<", "<", "<", "<", "<" ] } }expected data
{ "?xml": "", "tests": { "test": [ "<", "<", "<", "<", "<", "<", "<", "<", "<", "<", ] } }Would you like to work on this issue?
Bookmark this repository for further updates. Visit SoloThought to know about recent features.