-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
next/image produces invalid HTML according to W3C (again) #33809
Comments
It might be because of this PR: #33218. |
We should be able to encode space with |
Sure, I can open a PR (by first working to have a failing test)! 👍 next.js/packages/next/client/image.tsx Line 599 in 6b11a58
Is adding sizerSvgUrl = `data:image/svg+xml,%3csvg+xmlns=%27http://www.w3.org/2000/svg%27+version=%271.1%27+width=%27${widthInt}%27+height=%27${heightInt}%27/%3e` If it is what is wanted, yes I will open a PR. 😄 |
## Bug - [x] Fixes #33809 - [x] Related to #33218 - [x] Integration tests added: Usage of [html-validator](https://www.npmjs.com/package/html-validator) to validate the HTML. - [x] Errors have helpful link attached, see `contributing.md` (N/A)
## Bug - [x] Fixes vercel#33809 - [x] Related to vercel#33218 - [x] Integration tests added: Usage of [html-validator](https://www.npmjs.com/package/html-validator) to validate the HTML. - [x] Errors have helpful link attached, see `contributing.md` (N/A)
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Run
next info
(available from version 12.0.8 and up)What version of Next.js are you using?
12.0.9
What version of Node.js are you using?
16.13.2
What browser are you using?
N/A
What operating system are you using?
N/A
How are you deploying your application?
N/A
Describe the Bug
Using
[email protected]
yields no invalid HTML errors on the W3C Markup Validation Service aboutnext/image
.After upgrading to
[email protected]
, there is now this kind of error:There was already an error similar to this one before but that has been fixed: #18850
We might add a new e2e test or CI job to ensure that next produces valid HTML according to W3C, so it's not happening again as it is the case now...
Expected Behavior
No errors. Valid HTML according to W3C.
To Reproduce
npx create-next-app --example image-component image-app
cd image-app
npm run build
npm run start
localhost:3000
and copy/paste the HTML in The W3C Markup Validation Service or use thehtml-w3c-validator CLI.
The text was updated successfully, but these errors were encountered: