-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
Manually adding meta charSet produces duplicate tag #27142
Comments
Please verify that your issue can be recreated with Why was this issue marked with the
|
This issue has been automatically closed because it wasn't verified against next@canary. If you think it was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you. |
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. |
What version of Next.js are you using?
11.0.0
What version of Node.js are you using?
v12.16.1
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
n/a
Describe the Bug
Inside of a custom _document.tsx, adding
<meta charSet="utf-8" />
produces a duplicate tag in the server rendered output. This appears counter to the description in: #270The reason for manually adding the charset meta tag is to move the tag higher up in the to get around the schema validation error: "A charset attribute on a meta element found after the first 1024 bytes." It currently appears to be auto added at the end of the head contents from the _document.js and before other head tags (such as page level <title></title>).
Expected Behavior
If a manually added tag is used in a , that tag is utilized and there isn't a duplicate tag.
To Reproduce
Create a _document.tsx/.js with the following content and count the number of occurrences of the tag. It will be 2 - the one manually added and the one auto added.
Render and inspect output. See duplicate tags.
The text was updated successfully, but these errors were encountered: