The method percentEncode uses String.replace to replace a few entries that
aren't converted in
encodeURIComponent. I
nstead of using String.replace( regexp, newsubstr ) it uses String.replace(
substr, newsubstr,
flags )
But flags are a SpiderMonkey extention, and it fails to work properly in Safari
A quick test ( alert("*****".replace('*', '%2A', 'g')); will alert '%2A****'
instead of the expected
%2A%2A%2A%2A%2A
A change to "*****".replace( /\*/g, '%2A' ); solves the issue..
So I have made patch that changes the manual replacements lines to this format..
Original issue reported on code.google.com by morten.f...@gmail.com on 28 Jan 2009 at 1:36
Original issue reported on code.google.com by
morten.f...@gmail.com
on 28 Jan 2009 at 1:36Attachments: