NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 628 - Warn about unquoted attributes for some attributes
Warn about unquoted attributes for some attributes
Status: RESOLVED INTENTIONAL
Product: Validator.nu
Classification: Unclassified
Component: HTML parser
HEAD
All All
: P2 normal
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-01 14:39 CEST by Simon Pieters
Modified: 2015-04-01 09:40 CEST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Pieters 2009-08-01 14:39:55 CEST
Issue warnings when an attribute not listed below appears in unquoted form:

<link hreflang>
<meta http-equiv>
<meta charset>
<script charset>
<article pubdate>
<ol start>
<li value>
<a hreflang>
<time datetime>
<progress value max>
<meter value min low high max optimum>
<bdo dir>
<ins datetime>
<del datetime>
<img width height>
<iframe width height>
<embed width height>
<object width height>
<video width height>
<canvas width height>
<area shape hreflang>
<colgroup span>
<col span>
<td colspan rowspan>
<th colspan rowspan scope>
<form autocomplete enctype method>
<input autocomplete formenctype formmethod height max maxlength min size  
step type width>
<button formenctype formmethod>
<select size>
<textarea cols maxlength rows wrap>
<keygen keytype>
<command type>
<bb type>

dir
tabindex

See http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-July/021410.html
Comment 1 Simon Pieters 2009-08-01 14:43:00 CEST
I think xmlns and xmlns:xlink should be in the list, too, come to think of it.
Comment 2 Aryeh Gregor 2009-09-03 23:30:16 CEST
FWIW, latest MediaWiki will now allow outputting unquoted attributes anywhere they're allowed, making sure that it's safe.  E.g., it will happily do things like

<input pattern=....*>

which would of course trigger this warning.  This is totally safe, though, since the quotes are added if any invalid characters are present, and it would be annoying if it spammed warnings everywhere for no good reason.  The warning only really makes sense (arguably) for hand-written documents, or poorly-written applications.
Comment 3 Lars Gunther 2009-09-04 13:54:58 CEST
I think that by now it is safe to say that

a. There is a demand for this feature or something similar. The HTML5 "superfriends" wants polyglot checking capabilities, but I'd presume for basically the same reasons as I initiated the debate that led to S P filing this bug.

b. There is a strong sentiment that such warnings should be optional.

(BTW, While mediawiki has back-end processing to ensure that quotation marks get inserted when needed, it might be that some other developers chose to go down another route.)