encoded urls

40 views
Skip to first unread message

t3mp3l

unread,
May 24, 2013, 1:39:37 PM5/24/13
to sam...@googlegroups.com
Hi,

I heavily use hashMarks like this: #!list/id1/id2


But when my Website is beeing called from Microsoft Lync (with Internet Explorer) the url in the navigation bar is encoded like this:
#%21list/%7cview%7c


When I have firefox or chrome as default browser, the url is automatically decoded (and everything works fine).


Is there any simple way to tell sammy to first decode the Url and then apply the routing logic?
Or can somebody please suggest a clean and easy solution for this?

my current approach would be to also match the encoded url (so everyThing after #%). But so I would need to double all my Routing rules ;(


Thanks for any hints!
cheers, Stephan

Andriy Zhdanov

unread,
May 25, 2013, 4:05:16 AM5/25/13
to sam...@googlegroups.com
Hi,

I had similar problem, may be you can use my fix or similar fix could be included into sammyjs main stream:

js/sammy/sammy-0.7.2.js

     _checkLocation: function() {
       var location, returned;
       // get current location
-      location = this.getLocation();
+      location = decodeURIComponent(this.getLocation());
       // compare to see if hash has changed
       if (!this.last_location || this.last_location[0] != 'get' || this.last_location[1] != location) {
         // reset last location

Hope it helps,

Thank you.
Reply all
Reply to author
Forward
0 new messages