Re: [PHP] http_build_query ... argh

2006-11-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-11-10 14:08:22 +0100: Arpad Ray wrote: ~ %5[bd] # the bracket (?= # must be followed by [^]* # any characters except = # then a = ) ~eix thanks very much for the explanation! Note that it's still a

Re: [PHP] http_build_query ... argh

2006-11-10 Thread Jochem Maas
Larry Garfield wrote: On Thursday 09 November 2006 10:22, Jochem Maas wrote: apparently http_build_query() has been 'fixed' so that it now urlencodes square brackets (and if you have never used square brackets in a url pointing a php script then your obviously new here ;-) this is fine -

Re: [PHP] http_build_query ... argh

2006-11-10 Thread Jochem Maas
Arpad Ray wrote: Jochem Maas wrote: function inputPostQueryUnBorker($s) { return preg_replace('#(\?|(?:amp;)?)([^=]*)=#eU', '\\1'.str_replace(array('%5B','%5D'), array('[',']'), '\\2').'=', $s); } so how bad is it This is a

Re: [PHP] http_build_query ... argh

2006-11-10 Thread Arpad Ray
Jochem Maas wrote: Arpad Ray wrote: return preg_replace('#%5[bd](?=[^]*=)#ei', 'urldecode(\0)', $s); could you explain your regexp - I'd like to replace my version with your (if for no other reason than that shorter code is easier to read than longer code!) BUT until I really understand

Re: [PHP] http_build_query ... argh

2006-11-10 Thread Jochem Maas
Arpad Ray wrote: Jochem Maas wrote: Arpad Ray wrote: return preg_replace('#%5[bd](?=[^]*=)#ei', 'urldecode(\0)', $s); could you explain your regexp - I'd like to replace my version with your (if for no other reason than that shorter code is easier to read than longer code!) BUT until

[PHP] http_build_query ... argh

2006-11-09 Thread Jochem Maas
hi guys, long story ahead - the question at the end concerns whether the solution to my problem is obviously flawed (as far as anyone can see) and whether there might be a better/faster solution apparently http_build_query() has been 'fixed' so that it now urlencodes square brackets (and if

Re: [PHP] http_build_query ... argh

2006-11-09 Thread Arpad Ray
Jochem Maas wrote: function inputPostQueryUnBorker($s) { return preg_replace('#(\?|(?:amp;)?)([^=]*)=#eU', '\\1'.str_replace(array('%5B','%5D'), array('[',']'), '\\2').'=', $s); } so how bad is it This is a bit more concise. I

Re: [PHP] http_build_query ... argh

2006-11-09 Thread Larry Garfield
On Thursday 09 November 2006 10:22, Jochem Maas wrote: apparently http_build_query() has been 'fixed' so that it now urlencodes square brackets (and if you have never used square brackets in a url pointing a php script then your obviously new here ;-) this is fine - apart from the fact that