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.
This commit is contained in:
Kin Blas 2011-06-27 16:50:01 -07:00
parent 9729dc9f15
commit aff87cc9f1

View file

@ -88,7 +88,7 @@
}
relPath = relPath || "";
absPath = absPath ? absPath.replace( /^\/|\/?[^\/]*$/g, "" ) : "";
absPath = absPath ? absPath.replace( /^\/|(\/[^\/]*|[^\/]+)$/g, "" ) : "";
var absStack = absPath ? absPath.split( "/" ) : [],
relStack = relPath.split( "/" );