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

Has there been a change in how self-closing tags are validated? #1430

Closed
FrankPal opened this issue Sep 27, 2022 · 5 comments
Closed

Has there been a change in how self-closing tags are validated? #1430

FrankPal opened this issue Sep 27, 2022 · 5 comments

Comments

@FrankPal
Copy link

FrankPal commented Sep 27, 2022

URL being validated or code to reproduce error:
http://www.ussupernet.com/

Self-closing tag syntax in text/html documents is [widely discouraged](https://google.github.io/styleguide/htmlcssguide.html#Document_Type);

This page has validated with no errors or warnings for years. It uses <!DOCTYPE html>
Starting today, tags such as these create warnings:

<meta name="keywords" content="web development,web hosting,consulting,internet consulting,domain name registration,westerly,internet,hosting" />
<br/>
<link rel="shortcut icon" href="CapsShieldIcon.ico" type="image/x-icon" />
<img src="HomePhotos/CentralPark1860x750.jpg" width="1860" height="750" alt="Central Park" title="Central Park"  class="img-responsive img-rounded center-block" />

Is this a bug or have things changed?

@phpfui
Copy link

phpfui commented Sep 27, 2022

I just bumped into this today as well via a complete fluke.

I adjusted by source to comply with these requirements, as the best I can tell, they are correct.

I also found it was validating values. 0000-00-00 is not considered valid.

My issue is that there as not been a new release in over 2 years. I test against the June 30, 2020 release, and these errors are not flagged.

Ideally we need a new release. I don't see a vnu.jar file to download for the pre-release.

So all good, except for a new release!

@sideshowbarker
Copy link
Contributor

sideshowbarker commented Sep 28, 2022

@FrankPal It’s not a bug but instead it’s an intentional change that I made yesterday.

If you prefer to keep the document as-is rather than changing those tags to, e.g., <br> instead of <br/>, then you can use one of the checker’s message-filtering mechanisms to persistently filter out the “Self-closing tag syntax in text/html documents is widely discouraged” warning messages.

For example, you can use the Message Filtering button in the checker UI:

screen recording that shows how to use the Message Filtering button to persistently filter out messages

@sideshowbarker
Copy link
Contributor

@phpfui Thanks for the bump — I will try to get a new release out soon

@phpfui
Copy link

phpfui commented Sep 28, 2022

Awesome! This is a very valuable tool. I used it all the time in unit test to make sure my HTML is valid. All my sites validate 100% now with no errors or warnings. Nice stuff.

It is amazing how many (most) sites have bad HTML. UGH!

@FrankPal
Copy link
Author

FrankPal commented Oct 6, 2022

This has changed and it is discussed in this related thread: #1433

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

No branches or pull requests

3 participants