non Ascii URL error after edit modules

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
11/15/2009 12:31:30 PM
Gravatar
Total Posts 104

Re: non Ascii URL error after edit modules

Thanks for your efforts

I post some urls and incorrect encoding url

 

http://demo.mojoportal.com/تست-آدرس.aspx

http://demo.mojoportal.com/%c3%98%c2%aa%c3%98%c2%b3%c3%98%c2%aa-%c3%98%c2%a2%c3%98%c2%af%c3%98%c2%b1%c3%98%c2%b3.aspx

---------------------------------

http://ashian.ir/محصولات.aspx

http://ashian.ir/%c3%99%e2%80%a6%c3%98%c2%ad%c3%98%c2%b5%c3%99%cb%86%c3%99%e2%80%9e%c3%98%c2%a7%c3%98%c2%aa.aspx

----------------------------------

http://demo.mojoportal.com/تست-دوم.aspx

http://demo.mojoportal.com/%c3%98%c2%aa%c3%98%c2%b3%c3%98%c2%aa-%c3%98%c2%af%c3%99%cb%86%c3%99%e2%80%a6.aspx

I'm sure that the encoded url is not same as original as you see in your local.

11/16/2009 10:20:50 AM
Gravatar
Total Posts 18439

Re: non Ascii URL error after edit modules

Hi,

From more research I found this page

http://www.blooberry.com/indexdot/html/topics/urlencoding.htm

and this

http://tools.ietf.org/html/rfc3986#section-2.1

and this

http://www.rfc-editor.org/rfc/rfc1738.txt

So, it seems only a subset of ascii characters should be used in urls and other characters should always be url encoded.

But if we do this then it will not be possible to have friendly urls with Persian characters as all the characters will be encoded and then the url is not so friendly.

I will add a web.config setting for "AlwaysUrlEncode" and I will make the default be true, but at least it can be disabled if your users are mainly using a browser where no problem occurs you will have the option to disable it and it will work as it has in the past.

Best,

Joe

11/16/2009 3:48:13 PM
Gravatar
Total Posts 18439

Re: non Ascii URL error after edit modules

fyi, I worked on this today and I found that the solution of url encoding the entered characters works, in IE the urls look encoded, but other browsers decode them for display so it still shows Persian characters in the url in Chrome and Firefox even though it shows it as encoded in the page settings url textbox and in the db. 

The only problem is it won't fix existing urls, it will just create new urls correctly. I'm putting in some extra handling to try to make sure existing page urls will work with the <add key="AlwaysUrlEncode" value="true" />

Best,

Joe

11/16/2009 5:02:10 PM
Gravatar
Total Posts 18439

Re: non Ascii URL error after edit modules

I've updated demo.mojoportal.com with the latest code, can you try it and verify it works correctly.

Thanks,

Joe

11/17/2009 7:03:22 PM
Gravatar
Total Posts 104

Re: non Ascii URL error after edit modules

Many thanks.

I test it, add a new page : http://demo.mojoportal.com/تست-آدرس-فارسی.aspx

If I reach to page by clicking on menu , i can edit content several times whitout problem

but If I type the address using persian text, after editing I got Error 400, I test it 3 times.

 

regards

Mehdi

11/18/2009 2:48:00 PM
Gravatar
Total Posts 18439

Re: non Ascii URL error after edit modules

Please try again on demo.mojoportal.com and let me know if it seems fixed. I added one more setting to look for the unencoded url if the encoded one is not found.

I'm not sure there is anything else I can do since this is browser behavior of IE. Most users will access your pages by links rather than directly typing urls so I think in general we have got it as good as we can for IE. Other bowsers handle it better.

Thanks,

Joe

11/18/2009 11:33:07 PM
Gravatar
Total Posts 104

Re: non Ascii URL error after edit modules

Hi,

I checked it , if user directly type the URL , will get error 404.

users who want edit content , must login to site and then go to the page , so this scenario does not happen more often.

 

regards

You must sign in to post in the forums. This thread is closed to new posts.