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

Incorrect namespacing of MathML elements #4363

Closed
1 task done
lukewarlow opened this issue Apr 30, 2024 · 0 comments · Fixed by #4364
Closed
1 task done

Incorrect namespacing of MathML elements #4363

lukewarlow opened this issue Apr 30, 2024 · 0 comments · Fixed by #4364

Comments

@lukewarlow
Copy link

  • Check if updating to the latest Preact version resolves the issue

Describe the bug
Preact doesn't correctly namespace MathML elements.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://preactjs.com/repl?code=aW1wb3J0IHugcmVuZGVyIH0gZnJvbSAncHJlYWN0JzsKaW1wb3J0IHsgdXNlU3RhdGUgfSBmcm9tICdwcmVhY3QvaG9va3MnOwoKZnVuY3Rpb24gQ291bnRlcigpIHsKCXJldHVybiAoCgkJPD4KCTxtYXRoPjxtcm93PjEyMzwvbXJvdz48L21hdGg%2BCgk8c3ZnPjx0ZXh0PjEyMzwvdGV4dD48L3N2Zz4KCQk8Lz4KCSk7Cn0KCnJlbmRlcig8Q291bnRlciAvPiwgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2FwcCcpKTsK
  2. In dev tools select the <math> element, then run $0.namespaceURI and you will see http://www.w3.org/1999/xhtml
  3. If you then select the <svg> element, and repeat, you will correctly see http://www.w3.org/2000/svg

Expected behavior

I would expect Preact to handle MathML element namespacing correctly.

See https://w3c.github.io/mathml-core/ for the latest MathML spec.

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.

1 participant