URI not checked on W3C Markup Validator, identical direct input

I am trying to get a site to test as HTML5 on the W3C Markup Validator . When I use the "Validate by URI" parameter, it generates a lot of errors, but when I copy and paste the HTML into the "Validate by direct input", it is checked perfectly. When I run diff for the two sources returned by the validator, the only differences are the Rails authentication tokens (random strings used by Rails to validate forms - this is expected).

I noticed that in both cases I get the warning "No character encoding declared at the document level", which I saw on other sites, but was always considered an error in the HTML5 validator, because I have the corresponding meta tag:

<meta charset="UTF-8">

Most errors are something like the following:

  • Quote "in the attribute name. Probable reason: Quotation of the quote is missing somewhere earlier.
  • Bad attribute value for element label: identifier should not be an empty string.
  • The password attribute is not allowed on the item label at this point.

It acts like an inappropriate quote, but I can’t find anything wrong, and again, an identical direct input is checked perfectly.

Do you know what is going on here? Thanks!

+3
source share
4 answers

This is a known bug at the W3C Perl level. Validator.nu has the same trailing end, but without a Perl layer.

+4
<meta charset="UTF-8">

Try using this instead:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
0
source

Try <meta charset="UTF-8" />including closing the slash

0
source

Source: https://habr.com/ru/post/1715384/


All Articles