W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2012

[whatwg] URL query component

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 26 Apr 2012 13:51:44 +0200
Message-ID: <op.wdde8ir564w2qv@annevk-macbookpro.local>
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/
Received on Thursday, 26 April 2012 04:51:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:07 GMT