-
Notifications
You must be signed in to change notification settings - Fork 12k
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
index.html styles bundle link tag not closed causes problem with strict HTML validation #3217
Comments
Angular-cli uses HTML5 and not XHTML. Elements without closing / is perfectly valid in HTML5. Configure your parser to use HTML5 instad of XHTML. |
As @grizzm0 said HTML5 is perfectly fine with unclosed tags. I'm happy to review a PR that adds self closing tags if it helps people though. Probably somewhere in the |
Adding xhtml:true option to htmlwebpackplugin should enable closing tag. It should be added in webpack-build-common.ts file |
@filipesilva @cacogr, PR #3743 created to add this feature. |
Just to note you, this will be disabled again if my PR #5753 is merged. XHTML means one redundant character in minifying. |
Hey @CarreraPHP @filipesilva how do we enable this option? I couldn't compile CLI's index.html from Spring (thymeleaf) without doing this. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Versions.
I believe #2646 introduced a change in which styles are bundled in their own css file in a
link
tag inindex.html
. The problem is thislink
tag is missing the closing/
thus not passing strict validation.The template engine we have in the server, used to inject environment variables, etc. in the index.html before serving it, requires it to be a well-formed XHTML so every element must be closed.
Can you do anything about it?
The text was updated successfully, but these errors were encountered: