Re: Docs error?

[prev] [thread] [next] [Date index for 2005/04/26]

From: Stas Bekman
Subject: Re: Docs error?
Date: 16:16 on 26 Apr 2005
Carl Johnstone wrote:

> I'd suggest rewording the "answer" to something like:
> 
> ----------------
> 
> In a URL which contains a query string, if the string has multiple parts 
> separated by ampersands and it contains a key named "reg", for example 
> http://example.com/foo.pl?foo=bar&reg=foobar, then some browsers will 
> interpret &reg as an SGML entity and encode it as ®. This will 
> result in a corrupted QUERY_STRING.
> 
> The behaviour is actually correct, and the problem is that you have not 
> correctly encoded your ampersands into entities in your HTML. What you 
> should have in the source of your HTML is 
> http://example.com/foo.pl?foo=bar&reg=foobar.
> 
> A much better, and recommended solution is to separate parameter pairs 
> with ; instead of &. CGI.pm, Apache::Request and $r->args() support a 
> semicolon instead of an ampersand as a separator. So your URI should 
> look like this: http://example.com/foo.pl?foo=bar;reg=foobar.
> Note that this is only an issue within HTML documents when you are 
> building your own URLs with query strings. It is not a problem when the 
> URL is the result of submitting a form because the browsers have to get 
> that right. It is also not a problem when typing URLs directly into the 
> address bar of the browser.
> 
> Reference: 
> http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.2.2

+1. If there are no objections, I'll commit Carl's rewording.

Thanks Carl.

        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

(message missing)

Docs error?
Carl Johnstone 11:11 on 26 Apr 2005

Re: Docs error?
Geoffrey Young 13:13 on 26 Apr 2005

Re: Docs error?
Stas Bekman 13:57 on 26 Apr 2005

Re: Docs error?
Geoffrey Young 14:05 on 26 Apr 2005

Re: Docs error?
Stas Bekman 14:16 on 26 Apr 2005

Re: Docs error?
Geoffrey Young 14:22 on 26 Apr 2005

Re: Docs error?
Stas Bekman 14:31 on 26 Apr 2005

Re: Docs error?
Steve Hay 14:35 on 26 Apr 2005

Re: Docs error?
Stas Bekman 14:43 on 26 Apr 2005

Re: Docs error?
Carl Johnstone 16:01 on 26 Apr 2005

Re: Docs error?
Stas Bekman 16:16 on 26 Apr 2005

Re: Docs error?
Stas Bekman 03:50 on 10 May 2005

Re: Docs error?
Trond Michelsen 14:56 on 26 Apr 2005

Re: Docs error?
Ron Savage 23:51 on 26 Apr 2005

Generated at 06:57 on 17 May 2005 by mariachi v0.52