Re: Weird behaviour when using url encoded %

221 views
Skip to first unread message

Thomas Broyer

unread,
Jul 12, 2012, 5:32:48 AM7/12/12
to google-we...@googlegroups.com

On Thursday, July 12, 2012 12:28:10 AM UTC+2, kohlerfc wrote:
Hey guys,

I originally posted this on the GWTP forums but they seemed to think that it might be a GWT issue.

Im having issues when I try to use URL.encodeQueryString() on %. Basically it shows up in my browser url as %252525 rather then %25.  Is this a known bug in GWTP or in GWT? I have debugged down deep into GWTP and  the parameter seems to be set at %25 all the way along(as far as I could debug).

Also it seems to come back through gwtp as place request parameter with a value of %25 which is what I expect . So I just use the URL.decodeQueryString() and it works fine for now... 

Any help would be appreciated.

In which context are you using that value?
History.newItem also does a bit of sanitization/encoding, and then your browser can decide whether it shows you the %-encoded text or not. Note however that History.newItem is supposed to work with any kind of value, so if you give it "%25" it's very likely (I haven't looked at the code for ages) it'll encode the "%" and thus give you "%2525".

kohlerfc

unread,
Jul 13, 2012, 12:38:41 AM7/13/12
to google-we...@googlegroups.com
Thanks for the info. I will check if this is the case. So I guess I don't need to worry about my own URL encoding then.

kohlerfc

unread,
Jul 13, 2012, 1:42:02 AM7/13/12
to google-we...@googlegroups.com
Sorry I am using this value as on of my GWT parameters after the #token so for example #Search;queryString=somthing%
Reply all
Reply to author
Forward
0 new messages