capricorn86 / happy-dom

A JavaScript implementation of a web browser without its graphical user interface
MIT License
3.08k stars 185 forks source link

broken querySelectorAll when the string contains new lines #1461

Open masylum opened 3 weeks ago

masylum commented 3 weeks ago

Describe the bug When the selector contains new lines, querySelectorAll returns all sorts of things that it shouldn't.

To Reproduce

document.querySelectorAll(
  `pre, code, script, style, object, embed,
    iframe, form, input, textarea, button,
    select, option, nav`
)

and then compare with

document.querySelectorAll(
  'pre, code, script, style, object, embed, iframe, form, input, textarea, button, select, option, nav'
)

Expected behavior it should be the same