[Bug 6534] validator throws error on valid html

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6534


Austin Guthals <aguthals@shoom.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




--- Comment #4 from Austin Guthals <aguthals@shoom.com>  2009-02-06 21:58:16 ---
After further testing I have found that encoding ampersands in the href
attribute of an a element works correctly in most browsers, however other
elements and attributes do not work so well.

<a href="foo.cgi?chapter=1&amp;section=2&amp;copy=3&amp;lang=en">...</a>

will properly encode &amp; as '&' in the url.

However the following example does not get encoded correctly with IE7 or
Firefoz

<img src="foo.cgi?chapter=1&amp;section=2&amp;copy=3&amp;lang=en"></img>

The above example validates in your checker, however all modern browsers will
not properly translate the &amp; into '&' and what happens is the following
gets posted to the server

foo.cgi?chapter=1&amp;section=2&amp;copy=3&amp;lang=en

Since servers are looking for &, you end up with the following paramters

chapter = 1
amp;section=2
amp;copy=3
amp;lang=en

As you can see this is incorrect.  Your validator should not throw errors if
there are '&' in the path of an image because browsers will send the url
verbatim to the server, there is no encoding going on.

I can create a sample web page to demonstrate if you do not understand what is
going on.

Basically I am streaming images from the server and the w3c validator is
throwing bogus errors in which there are no workarounds or fixes to.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 6 February 2009 21:58:25 UTC