Re: Suspected Bug in Validator

Alan Grogono <info@animatedknots.com>, 2015-08-26 21:54 -0400:
> Archived-At: <http://www.w3.org/mid/CACrDOUx3y9xkVAEmOecN_SKT5xDYrCxC0caeqk2=FG7HvCHX6A@mail.gmail.com>
...
> I have just validated my entire website:
> http://www.animatedknots.com/index.php
> 
> Every page I checked showed the same error - even after deleting all
... 
> 3. Error: Bad value
> AdvertChoiceFiles/ipadcount.php?Categ=home&File=index&UserAgent=Validator.nu/LV
> http://validator.w3.org/services&Advert=Banner for attribute href on
> element a
> <http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-a-element>:
> Illegal character in query: not a URL code point.
> 
> I do not understand it.  This message appears on every page.  None of this
> text appears in the Source Code.

The source you’re looking at may not represent what you serve actually
sends over the wire. The server-side code may change the content before
sending it.

So, for http://www.animatedknots.com/index.php it seems like the server-
side code probably is set up to emit and ad (an `a` element wrapped around
an `img` element) at line 235 of what it sends over the wire. And what it
emits may depend on user-agent it detects, or whatever.

So when the checker requests http://www.animatedknots.com/index.php what it
gets back over the wire is a document that at line 235 has this:

  <a HREF='AdvertChoiceFiles/ipadcount.php?Categ=home&amp;File=index&amp;UserAgent=Validator.nu/LV
  http://validator.w3.org/services&amp;Advert=Banner' ><img style='width:
  624px; height: 77px; border: none;' src='adsense/ipadbanner.jpg' alt='Advert' ></a

And although it’s not obvious from the error message (which I need to
improve), the problem is that the URL has a space in it, in this part:

  UserAgent=Validator.nu/LV http://validator.w3.org/services

That is, after the “LV”. That’s because there it’s just echoing the user-
agent string that the validator sends it.

Anyway, this is not a bug in the validator. The bug is that the
http://www.animatedknots.com/index.php code is spitting out that UA string
at all to begin with there, and not even percent-encoding (URL escaping) it
before doing that.

So to fix this I think you need to talk with whoever writes/manages the
server-side (PHP) setup for http://www.animatedknots.com/index.php and ask
them to fix the code so that it’s not emitting that space in the ad URL.

  —Mike

-- 
Michael[tm] Smith https://people.w3.org/mike

Received on Thursday, 27 August 2015 08:29:15 UTC