asual / jquery-address

jQuery Address - Deep linking for the masses
http://www.asual.com/jquery/address
GNU General Public License v2.0
815 stars 172 forks source link

url encoding not working #101

Open citkane opened 13 years ago

citkane commented 13 years ago

I am trying jquery-address for the first time and have downloaded version 1.4.

I dropped the "crawling" sample folder into my apache2 server site root and browsed http://mysite.mydomain/crawling. The page loads fine onto the home page, but all the deep links produce a "404".

I noted the following:

The link for "learn more" address in the browser has taken the format - http://mysite.mydomain/crawling/#!/%2Flearn-more If I manually change the encoding for "/%2F" to just "/" it works fine.

This principle is true for all the deep links.

Is this a bug or have I missed a fundamental step somewhere?

joksnet commented 12 years ago

Related to #96

anilex commented 12 years ago

Have you considered that the row in crawling example: $('.content').html($('.content', data).html()).parent().show(); is encoding all urls because $('.content', data).html(); and all ajax loaded links will be similar to href="#%21/learn-more" instead href="#!/learn-more"

This may solve the problem temporally: $('.content').html(decodeURIComponent($('.content', data).html())).parent().show();