Skip to content

Parsing error with special characters (æøåÆØÅ) in unquoted attribute value #1817

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

Open
AudunWA opened this issue May 19, 2025 · 0 comments · May be fixed by #1818
Open

Parsing error with special characters (æøåÆØÅ) in unquoted attribute value #1817

AudunWA opened this issue May 19, 2025 · 0 comments · May be fixed by #1818
Labels
bug Something isn't working

Comments

@AudunWA
Copy link

AudunWA commented May 19, 2025

Describe the bug
Special characters, in this case æ, ø, å, Æ, Ø or Å are not working correctly when parsing unquoted attributes.

To Reproduce
Steps to reproduce the behavior:
Run the reproduction script:

import { Window } from "happy-dom";
const window = new Window();
window.document.body.innerHTML = "<div id=æøåÆØÅ></div>";
const output = window.document.body.innerHTML;
// Expected output: <div id="æøåÆØÅ"></div>
// Actual output: <div id=""></div>
console.log(output);

Expected behavior
Expected output: <div id="æøåÆØÅ"></div>, as the input is valid HTML.

Device:

  • happy-dom: 17.4.7
  • Node.js: 22.15.1

Additional context
Probably related to #1237.

@AudunWA AudunWA added the bug Something isn't working label May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant