Don't know if it's worth reporting... http://validator.w3.org/ reports the following errors (I have Domain Navigation block in home page left sidebar, Garland).
document type does not allow element "select" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
…this.value) location.href=this.value;"><option value="http://domain.foo.com/">…
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "p" or "table") inside an inline element (such as "a", "span", or "font").
the name and VI delimiter can be omitted from an attribute specification only if SHORTTAG YES is specified
…alue="http://domain.foo.com/" selected>domain</option><option value="http://…
"VI delimiter" is a technical term for the equal sign. This error message means that the name of an attribute and the equal sign cannot be omitted when specifying an attribute. A common cause for this error message is the use of "Attribute Minimization" in document types where it is not allowed, in XHTML for instance.
How to fix: For attributes such as compact, checked or selected, do not write e.g <option selected ... but rather <option selected="selected" ...
Comments
Comment #1
agentrickardIt's worth a patch, sure.
I had to read that all the way through. It looks like the validator doesn't like this admittedly old-school code:
Here's a patch.
Comment #2
skizzo commentedLooks like the patch fixes the second error only. The first one
(document type does not allow element "select" here)
is still there. Thank you.
Comment #3
agentrickardI don't understand how that is a bug.
Please explain clearly what the demands from the validator are, or update the patch.
Is the validator actually saying that you can't nest a form element inside a form without some kind of space marker (DIV, P, H1)?
If so, that's really stupid, since I'd have to insert an empty bounding DIV (with no properties) just to pass validation.
Comment #4
agentrickardNeeds work, as I obviously don't understand the bug report.
Comment #5
agentrickardPointless, but ready for review.
Comment #6
skizzo commentedwith latest patch my pages now pass XHTML 1.0 Strict validation. I found the following comment in stackoverflow: "In HTML4 / XHTML1, you can't put inline content directly into a form element. HTML5, on the other hand, lifts that requirement"
Comment #7
agentrickardI don't know what that last comment means.
Looks like I'm getting cranky in my old age. This code has worked fine since 1995. Committing anyway.