Urldecode Problem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Urldecode Problem

Frederik M. Kraus
Hi Guys,

Looks like we ran into a urldecode problem when having certain query
strings. This is what happens:

Client:  Jeffrey's Bay   ->   Jeffrey%26%2339%3Bs+Bay   (php 5.2
urlencode/rawurlencode)

Solr:   Jeffrey%26%2339%3Bs+Bay   ->   Jeffrey%26#39;s+Bay

This is according to the solr logfile and the
&echoParams=explicit&debugQuery=true output.

Is this a know / expected behaviour and if yes, is there anything we can do?

Thanks a lot

Fred.


Reply | Threaded
Open this post in threaded view
|

Re: Urldecode Problem

Yonik Seeley-2
On 10/6/07, Frederik M. Kraus <[hidden email]> wrote:
> Looks like we ran into a urldecode problem when having certain query
> strings. This is what happens:
>
> Client:  Jeffrey's Bay   ->   Jeffrey%26%2339%3Bs+Bay   (php 5.2
> urlencode/rawurlencode)

It looks like the client is doing XML escaping as it replaces ' with &#39;
Then each char of the &#39; is URL encoded.  This is incorrect of
course, urlencoding has nothing to do with XML.

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: Urldecode Problem

Frederik M. Kraus
This was a good hint. Apparently php's ext/filter does some fancy recoding
of some sort for the ' which then later is producing this encoded url.

Now that I am not using ext/filter everything is fine ;)

Thanks a lot!

Fred.


Am 07.10.2007 16:13 Uhr schrieb "Yonik Seeley" unter <[hidden email]>:

> On 10/6/07, Frederik M. Kraus <[hidden email]> wrote:
>> Looks like we ran into a urldecode problem when having certain query
>> strings. This is what happens:
>>
>> Client:  Jeffrey's Bay   ->   Jeffrey%26%2339%3Bs+Bay   (php 5.2
>> urlencode/rawurlencode)
>
> It looks like the client is doing XML escaping as it replaces ' with &#39;
> Then each char of the &#39; is URL encoded.  This is incorrect of
> course, urlencoding has nothing to do with XML.
>
> -Yonik