Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@jblas jblas authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  js/jquery.mobile.navigation.js
View
2  js/jquery.mobile.navigation.js
@@ -88,7 +88,7 @@
}
relPath = relPath || "";
- absPath = absPath ? absPath.replace( /^\/|\/?[^\/]*$/g, "" ) : "";
+ absPath = absPath ? absPath.replace( /^\/|(\/[^\/]*|[^\/]+)$/g, "" ) : "";
var absStack = absPath ? absPath.split( "/" ) : [],
relStack = relPath.split( "/" );
Please sign in to comment.
Something went wrong with that request. Please try again.