Stas Bekman wrote:
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®=foobar, then some
browsers will interpret ® 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.
Carl, your re-wording was committed. Thank you.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com