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

HTML select element cannot contain hr elements #11342

Closed
kran6a opened this issue Apr 26, 2024 · 1 comment · Fixed by #11344
Closed

HTML select element cannot contain hr elements #11342

kran6a opened this issue Apr 26, 2024 · 1 comment · Fixed by #11344

Comments

@kran6a
Copy link

kran6a commented Apr 26, 2024

Describe the bug

The following WHATWG-spec-compliant code causes an error in Svelte 5 but not in Svelte 4

<select>
    <option value="0">The</option>
     <hr>
    <option value="1">bug</option>
</select>

Thre is even an example of using hr as an separator in https://html.spec.whatwg.org/#the-select-element:
image

Reproduction

https://svelte-5-preview.vercel.app/#H4sIAAAAAAAACnWNvQqDMBhFX-XjzgHbNaSBvkO3poPVzxqISciPUMR3L6KDS8d7uIezYLCOM-RzgW8nhsQ9RgiUb9xGntkVhkAONXUbUZkdd0UbT0SkQiw2eJpbV_lmcDHQj5FVs_PjRWpMf4SrgX7Xz0lQzVGAwBR6O1juIUuqvL7WH49vgSKwAAAA

Logs

<hr> is invalid inside <select>

System Info

Does not matter

Severity

annoyance

@brunnerh
Copy link
Member

On that note, apparently script and template are also allowed.

dummdidumm pushed a commit that referenced this issue Apr 27, 2024
Closes #11342
---------

Co-authored-by: Jeremiasz Major <jrh.mjr@gmail.com>
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