Skip to content
This repository
Browse code

Fix for the mysterious "page is too large" error Todd and Scott were …

…seeing on Blackberry 5 prior to shipping jQM beta 1.

Turns out this little code was enough to invoke the error:

"/dir1/dir2".replace(/\/?/, "");

Rewrote the regexp in path.makePathAbsolute() that was stripping leading slash, and trailing filename/slash. This gets around the problem.

Special thanks to @adambiggs for helping me test 33 iterations when trying to narrow down what in jquery.mobile.navigation.js was choking BB5.
  • Loading branch information...
commit aff87cc9f171cd12fb4b40f061cea12fc4cce45a 1 parent 9729dc9
Kin Blas authored June 27, 2011

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  js/jquery.mobile.navigation.js
2  js/jquery.mobile.navigation.js
@@ -88,7 +88,7 @@
88 88
 				}
89 89
 		
90 90
 				relPath = relPath || "";
91  
-				absPath = absPath ? absPath.replace( /^\/|\/?[^\/]*$/g, "" ) : "";
  91
+				absPath = absPath ? absPath.replace( /^\/|(\/[^\/]*|[^\/]+)$/g, "" ) : "";
92 92
 		
93 93
 				var absStack = absPath ? absPath.split( "/" ) : [],
94 94
 					relStack = relPath.split( "/" );

0 notes on commit aff87cc

Please sign in to comment.
Something went wrong with that request. Please try again.