-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
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
Error: Invalid character entity when use !ENTITY #443
Comments
Hi @Yookkee, did you find a way to escape that error? |
sax-js ignores custom DTD |
Here's an ugly workaround: let parser = new xml2js.Parser();
parser.saxParser.ENTITIES.xxe = 'whatever';
parser.parseString('<foo>&xx;</foo>', (err, res) => {
if (err) console.log(err);
else console.log(res);
}); Result: { foo: 'whatever' } You shouldn't use this in production code though. |
Is it possible to parse the following code, or any which uses External Entities using parseString function?
![capture](https://user-images.githubusercontent.com/15655261/38469827-a00657ce-3b63-11e8-85e7-98b43166b3b7.PNG)
It always output errors like this
The text was updated successfully, but these errors were encountered: