When I ran a validator on my site, it complained about the use of:

language="JavaScript" (script tag)
and
border="0" (img tag)

I have a patch that removes these. It was also complaining about and Only local images are allowed. in the so maybe those aren't allowed in there.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Kristen Pol’s picture

I'm not seeing where I can edit the original issue body. The final part of my message got messed up since there was html in there, so here it is again:

It was also complaining about <a> and <img> in the <noscript> so maybe those aren't allowed in there.

nicholas.alipaz’s picture

Came here looking for this issue. These errors are seen when using a strict doctype.

line 780 column 79 - Error: document type does not allow element "a" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
line 781 column 28 - Error: there is no attribute "border"

This module should output xhtml valid code.

The offending lines:

778 <script language="JavaScript" type="text/javascript"><!--
779 if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')
780 //--></script><noscript><a href="http://www.omniture.com" title="Web Analytics"><img src="/8143892"
781 height="1" width="1" border="0" alt="" /></a></noscript><!--/DO NOT REMOVE/-->
yang_yi_cn’s picture

+1 for all the above

sperks’s picture

It is worth keeping in mind that HTML validation tools are just that, tools, and achieving fully validated HTML is not more important than delivering intelligent, well thought out HTML.

That said, D6's default theme comes with DOCTYPE strict, rather than the more past/future friendly HTML5, so my suggestion would be:

  • Remove the language attribute
  • Remove the border attribute
  • Add a div to the inside of the noscript

The language attribute is depreciated

The border attribute is depreciated (an OLD safeguard to stop the pretty blue border from appearing on images within an anchor tag, which Drupal's default.css (img { border: 0; }) takes care of).

Validation is important to some, so if only to placate the people who like to add the "This site validates" image on their site, add the div so the noscript error disappears - I have NEVER seen a logical explanation for why the noscript thinks it needs this, but while we have DOCTYPE strict in D6, and the validating tools expect it.

greggles’s picture

Priority: Minor » Normal
Status: Active » Needs review

Better statuses. I'm not really in a position to test/review this, but if a consensus forms among users I would be happy to commit.

sperks’s picture

The attached patch should validate strict