[whatwg] URL query component

Anne van Kesteren annevk at opera.com
Thu Apr 26 04:51:44 PDT 2012


On Fri, 20 Apr 2012 15:19:10 +0200, Julian Reschke <julian.reschke at gmx.de>  
wrote:
> I think this is a case where you want to fail early (for some value of  
> "fail"); so maybe substituting with "?" makes most sense.
>
> Do any servers *expect* the Webkit behavior? If they do so, why don't  
> they just fix the pages they serve to use UTF-8 to get consistent  
> behavior throughout?

Given that every browser does something different I doubt anyone expects  
anything to work here. Note that this is an edge case, form submission,  
both GET and POST, uses the "&#...;" pattern whenever an encoder error is  
emitted. This is solely about URLs query parameters appearing as string  
value of HTML attributes that take URLs. Given that it is such an edge  
case, using the same encoder behavior seems nice as it means one code path  
less.

Having said that, if there are other places where we expose the encoder  
and there something other than "&#...;" or fatal error is required, that  
would be very interesting to know. I have not been able to think of  
anything myself thus far.


-- 
Anne van Kesteren
http://annevankesteren.nl/



More information about the whatwg mailing list