Skip to content
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

Raise an error for missing namespace prefix #5

Closed
Zirro opened this issue Jan 8, 2019 · 1 comment · Fixed by jsdom/jsdom#2480
Closed

Raise an error for missing namespace prefix #5

Zirro opened this issue Jan 8, 2019 · 1 comment · Fixed by jsdom/jsdom#2480

Comments

@Zirro
Copy link

Zirro commented Jan 8, 2019

Test case:

const saxes = require("saxes"),
      parser = new saxes.SaxesParser({ xmlns: true });

parser.onerror = function (e) {
  console.log(e);
};

parser.write('<span xmlns:="urn:x-test:test">12</span>').close();

I believe the code above is expected to produce an error, based on the following test in https://github.com/web-platform-tests/wpt/blob/master/domparsing/DOMParser-parseFromString-xml-parsererror.html#L24. It's currently passing in two browsers.

@lddubeau
Copy link
Owner

lddubeau commented Jan 8, 2019

Thank you! 3.1.5 has the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants