I do an HTTP GET request for a page using the following URL in Safari:
mysite.com/page.aspx?param=v%e5r
The page contains a form which posts back to itself.
The HTML form tag looks like this when output by asp.net:
<form method="post" action="page.aspx?param=v%u00e5r" id="aspnetForm" >
When Safari POSTs this back it somehow converts this URL to:
page.aspx?param=v%25u00e5r
, i.e. it URL encodes the already URL encoded string, which is then double encoded and the output generated by this parameter is garbled (vår
). I am able to get around this some places by URL decoding the parameter before printing it.
Firefox and even IE8 handles this fine. Is this a bug in WebKit or am I doing something wrong?
To summarise:
mysite.com/page.aspx?param=v%e5r
HTML:
<form method="post" action="page.aspx?param=v%u00e5r" id="aspnetForm" >
mysite.com/page.aspx?param=v%25u00e5r
HTML:
<form method="post" action="page.aspx?param=v%25u00e5r" id="aspnetForm" >