Breaking XHTML 1.0 Strict

nickbits - July 25, 2008 - 19:54
Project:http:BL
Version:5.x-2.1
Component:Code
Category:bug report
Priority:normal
Assigned:praseodym
Status:won't fix
Description

Hi,

Firstly, well done on an excellent module. I would not be with out it.

I have been having issues validating my site to XHTML 1.0 and it would appear to be the HTTPBL module breaking it. The error I get when validating is:

Line 277, Column 116: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag.

…<div style="height: 0px; width: 0px;"></div></a></div><script type="text/java

When I ahve looked at the code generated I see:

<div>
<a href="http://thatchamhistoricalsociety.org.uk/twopiecestraightawa.php">
<div style="height: 0px; width: 0px;">
</div>
</a>
</div>

I note that there is a 'div' inside an 'a', which I do not believe is allowed under XHTML. the 'a' tags should be inside div tags but not the otherway around. Any chance of a fix for this?

Regards,
Nick

#1

praseodym - July 25, 2008 - 20:37
Assigned to:Anonymous» praseodym

The problem is caused by the random honeypot footer; it has a bunch of quite creative methods (copied straightly from Project Honeypot) to include a link which is not displayed but should be followed by bots. An empty anchor-tag might not be followed by bots, while this one has a higher chance of success.

I'll review all the link methods to see if they're valid; I hope to fix this in next week or so.

#2

praseodym - September 6, 2009 - 20:38
Status:active» won't fix

5.x is unmaintained, 6.x should validate XHTML fine.

 
 

Drupal is a registered trademark of Dries Buytaert.