xmlbuilder2
xmlbuilder2 copied to clipboard
Encoding issue when & html entity is followed by a ";" not preceded by a "&".
Hello, I think this is a strange behaviour:
Code:
console.log('--- input ---------------------------------------------');
console.log(input);
var output = create(input);
console.log('--- output --------------------------------------------');
console.log(output.toString({prettyPrint: true}));
Output:
--- input ---------------------------------------------
<?xml version="1.0"?>
<testsuites>
<testsuite>
<testcase name="&"/>
<!-- OK -->
<testcase name="""/>
<!-- OK -->
<testcase name="&&"/>
<!-- OK -->
<testcase name=""""/>
<!-- OK -->
<testcase name="&""/>
<!-- OK -->
<testcase name="&&fake;"/>
<!-- OK -->
<testcase name="&&;"/>
<!-- OK -->
<testcase name="";"/>
<!-- OK -->
<testcase name=""!;"/>
<!-- OK -->
<testcase name="&;"/>
<!-- BROKEN -->
<testcase name="&!;"/>
<!-- BROKEN -->
<testcase name="&abc;def"/>
<!-- BROKEN -->
<testcase name="Hello & world today; or tomorrow"/>
<!-- BROKEN -->
</testsuite>
</testsuites>
--- output --------------------------------------------
<?xml version="1.0"?>
<testsuites>
<testsuite>
<testcase name="&"/>
<!-- OK -->
<testcase name="""/>
<!-- OK -->
<testcase name="&&"/>
<!-- OK -->
<testcase name=""""/>
<!-- OK -->
<testcase name="&""/>
<!-- OK -->
<testcase name="&&fake;"/>
<!-- OK -->
<testcase name="&&;"/>
<!-- OK -->
<testcase name="";"/>
<!-- OK -->
<testcase name=""!;"/>
<!-- OK -->
<testcase name="&;"/>
<!-- BROKEN -->
<testcase name="&!;"/>
<!-- BROKEN -->
<testcase name="&abc;def"/>
<!-- BROKEN -->
<testcase name="Hello & world today; or tomorrow"/>
<!-- BROKEN -->
</testsuite>
</testsuites>
This happen when & html entity is followed by a ";" not preceded by a "&".
Should be fixed?
@oozcitak : Hi Ozgur, This issues is pretty blocking for us. Do you know if and when we could expect a fix? Kind regards, Henk
Is there any update on merging this change anytime soon? I'm also experiencing this issue and I see this has been open since last year.
@oozcitak Just made #154 to help bring this across the finish line.