Skip to content

Commit aff87cc

Browse files
committed
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.
1 parent 9729dc9 commit aff87cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/jquery.mobile.navigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
}
8989

9090
relPath = relPath || "";
91-
absPath = absPath ? absPath.replace( /^\/|\/?[^\/]*$/g, "" ) : "";
91+
absPath = absPath ? absPath.replace( /^\/|(\/[^\/]*|[^\/]+)$/g, "" ) : "";
9292

9393
var absStack = absPath ? absPath.split( "/" ) : [],
9494
relStack = relPath.split( "/" );

0 commit comments

Comments
 (0)