We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To reproduce with 0.1.6:
var et = require('elementtree'), root = et.Element('root'), cruelty = '<![CDATA[x]]>'; root.append(et.CData(cruelty)); console.log(et.tostring(root));
Buggy output:
<?xml version='1.0' encoding='utf-8'?> <root><![CDATA[<![CDATA[x]]>]]></root>
xmllint complaint:
xmllint
foo:2: parser error : Sequence ']]>' not allowed in content <root><![CDATA[<![CDATA[x]]>]]></root>
Workaround:
root.append(et.CData(cruelty.replace(']]>', ']]]]><![CDATA[>'));
Output of workaround:
<?xml version='1.0' encoding='utf-8'?> <root><![CDATA[<![CDATA[x]]]]><![CDATA[>]]></root>
The text was updated successfully, but these errors were encountered:
If you use the workaround, I'd edit your package.json to lock elementtree at 0.1.6 by removing the ~ before 0.1.6:
package.json
elementtree
~
0.1.6
"dependencies": { "elementtree": "0.1.6" }
Sorry, something went wrong.
No branches or pull requests
To reproduce with 0.1.6:
Buggy output:
xmllint
complaint:Workaround:
Output of workaround:
The text was updated successfully, but these errors were encountered: