Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Because of an issue on one of my modules, I was trying to get some taxonomy-term-like stuff to validate. Finally I decided just to check a real "taxonomy/term" page and it fails to validate as XHTML strict.
Error Line 144, Column 51: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag .
…s="taxonomy"><ul class="links inline"><li class="first last taxonomy_term_72"
Line 144 is:
<span class="taxonomy"><ul class="links inline"><li class="first last taxonomy_term_72"><a href="/taxonomy/term/72" rel="tag" title="A proprietary operating system from Microsoft." class="taxonomy_term_72 active">Windows</a></li>
Comment | File | Size | Author |
---|---|---|---|
#1 | bluemarine.patch | 942 bytes | fgm |
Comments
Comment #1
fgmAs I answered on the dev list (and as Andrew correctly guessed), that UL is a block element inside a SPAN, which is an inline element. The fact that it is themed as being inlinse with the CSS class "inline" does not change that nesting constraint.
The attached patch contains a quick fix, but it feels really hackish: someone with better drupal theming knowledge should improve it. Also, it has been created by TortoiseCVS, BTW, so it is probably not in canonical format for a core patch.
This is hardly critical, IMHO, though.
Comment #2
recidive CreditAttribution: recidive commentedDuplicated of #85667: XHTML 1.0 Strict when rendering nodes with taxonomy terms.