@@ -12,7 +12,7 @@ define( [ "jquery", "./jquery.mobile.navigation", "../external/requirejs/depend!
1212 var pushStateHandler = { } ,
1313 self = pushStateHandler ,
1414 $win = $ ( window ) ,
15- url = $ . mobile . path . parseUrl ( location . href ) ,
15+ url = $ . mobile . path . parseLocation ( ) ,
1616 mobileinitDeferred = $ . Deferred ( ) ,
1717 domreadyDeferred = $ . Deferred ( ) ;
1818
@@ -34,7 +34,8 @@ define( [ "jquery", "./jquery.mobile.navigation", "../external/requirejs/depend!
3434
3535 state : function ( ) {
3636 return {
37- hash : $ . mobile . path . parseUrl ( location . href ) . hash || "#" + self . initialFilePath ,
37+ // firefox auto decodes the url when using location.hash but not href
38+ hash : $ . mobile . path . parseLocation ( ) . hash || "#" + self . initialFilePath ,
3839 title : document . title ,
3940
4041 // persist across refresh
@@ -72,9 +73,10 @@ define( [ "jquery", "./jquery.mobile.navigation", "../external/requirejs/depend!
7273 }
7374
7475 var href , state ,
75- hash = $ . mobile . path . parseUrl ( location . href ) . hash ,
76+ // firefox auto decodes the url when using location.hash but not href
77+ hash = $ . mobile . path . parseLocation ( ) . hash ,
7678 isPath = $ . mobile . path . isPath ( hash ) ,
77- resolutionUrl = isPath ? location . href : $ . mobile . getDocumentUrl ( ) ;
79+ resolutionUrl = isPath ? $ . mobile . path . getLocation ( ) : $ . mobile . getDocumentUrl ( ) ;
7880
7981 hash = isPath ? hash . replace ( "#" , "" ) : hash ;
8082
@@ -139,7 +141,7 @@ define( [ "jquery", "./jquery.mobile.navigation", "../external/requirejs/depend!
139141
140142 // if there's no hash, we need to replacestate for returning to home
141143 if ( location . hash === "" ) {
142- history . replaceState ( self . state ( ) , document . title , location . href ) ;
144+ history . replaceState ( self . state ( ) , document . title , $ . mobile . path . getLocation ( ) ) ;
143145 }
144146 }
145147 } ) ;
0 commit comments