Friendly Url removing encoded amperstand from query string

Hey guys I have a bit of a werid issue which I want to run by you. The basic problem is when I am passing information between pages using a query string to store values any text which contains an ampersand has the ampersand and any following text removed from the finial url. The information is always url encoded. For example the url before I do a response redirect is: ?autonomyName=appearance_measurement_motion_scale_time&conceptName=Motion%2c+Measurement%2c+Scale+%26+Time&searchTerms=made but on reaching the other page it is changed to: ?autonomyName=appearance_measurement_motion_scale_time&conceptName=Motion%2c%2520Measurement%2c%2520Scale%2520&searchTerms=made Notice the lack of "+%26+Time" from the url. Is this a known issue with episerver or has anyone got any ideas?
Sep 01, 2006 12:48
What does the original url look like before you encode it?
Sep 01, 2006 14:06
The url if it was not encoded would look something like this. However as I am encoding as the url is built up any information is always encoded before the Response.Redirect method is called. ?autonomyName=appearance_measurement_motion_scale_time&conceptName=Motion, Measurement, Scale & Time&searchTerms=made
Sep 01, 2006 16:54
What type of encoding are you doing? I can reproduce the problem with Server.HtmlEncode and Server.UrlPathEncode, but it works ok with Server.UrlEncode. Insert the following somewhere in your default.aspx: | |
Server.HtmlEncode | Server.UrlEncode | Server.UrlPathEncode
<%= OutputQueryString() %>
and play around with the links. Hopefully you can find the one that works best for you. /Steve
Sep 01, 2006 19:55
I am using HttpUtility.UrlEncode to do my encoding which works fine when using a standard application but seems to fail within the episerver environment.
Sep 01, 2006 21:07
The code above worked in my EPiServer environment. Have you tried to disable the friendly urls?
Sep 01, 2006 22:10
Hello Michael! What version are you using? If I don't remember wrong there was a bug with this in 4.60 that was fixed in 4.61. If you are running on 4.60, try if a upgrade may solve your problem.
Sep 06, 2006 9:47
There is a bug in 4.61 that removes the querystring on postbacks. Hopefully fixed in next hotfix. With some inheritance and own implementations it can be fixed on current versions. /HAXEN
Sep 07, 2006 14:52
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.