NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 962 - Unexpected "Stray end tag" for start tag in <option><span>foo</span></option>
Unexpected "Stray end tag" for start tag in <option><span>foo</span></option>
Status: RESOLVED FIXED
Product: Validator.nu
Classification: Unclassified
Component: HTML parser
HEAD
All All
: P2 normal
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-08 19:40 CET by Michael[tm] Smith
Modified: 2013-06-27 18:00 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael[tm] Smith 2013-02-08 19:40:37 CET
The <span> tag in the following markup instance causes the validator to emit an "Stray end tag `span`" message.

<!doctype html><select><option><span>foo</span></option></select>

http://krijnhoetmer.nl/irc-logs/whatwg/20130208#l-825

# [18:08] <GPHemsley> MikeSmith, hsivonen: I don't remember who's in charge of the various validators, but they seem to treat all tags within <option> as stray end tags, even when they're start tags  
# [18:11] <MikeSmith> GPHemsley: pretty sure that's not the case for http://validator.nu/ or http://validator.w3.org/nu/  
# [18:11] <MikeSmith> which are the only ones I work on  
# [18:12] <GPHemsley> MikeSmith: Oh, it indeed is the case. :)  
# [18:12] <GPHemsley> http://validator.w3.org/nu/?doc=http%3A%2F%2Fwww.govtrack.us%2F  
# [18:12] <MikeSmith> ok if so that's due to the validator having a parser that follows the spec  
# [18:12] <GPHemsley> Hixie: Oh, so this is your fault? ;)  
# [18:14] <MikeSmith> that message may just be a copy/paste error in the htmlparser code  
# [18:14] <GPHemsley> ah, much simpler  
# [18:16] <GPHemsley> If so, though, it's carried over from the old one to the new one  
# [18:16] <GPHemsley> (nu one)  
# [18:17] <MikeSmith> hmm no, because the error message from "View source" in Firefox says "Stray start tag" as expected.  
# [18:17] <GPHemsley> eesh, view source is 7 lines?? >_<  
# [18:18] <GPHemsley> (and only because a <dl> apparently gets special formatting)  
# [18:20] <MikeSmith> hmm weird that there's this difference between the messages from Firefox and the validator  
# [18:20] <MikeSmith> because it's the same parser and those messages come straight from the parser code, not the validator code