jquery/jquery-mobile — pull request #4890 by ryankirkman (2012-08-23 06:38:12+00:00)
Title: Fixed bug that throws an error in $.mobile.changePage

The error is thrown at: https://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.navigation.js#L1098

**To replicate the bug you need a specific set of conditions:**
https://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.navigation.js#L1017 will incorrectly return an empty string because the call to `path.convertUrlToDataUrl( settings.dataUrl )` incorrectly returns an empty string when `settings.dataUrl` looks like `http://eample.com/myapp/#` - note the `#` on the end

**To fix the bug**
`path.convertUrlToDataUrl( ... )` at https://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.navigation.js#L180 needs to add an additional check at https://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.navigation.js#L182 to ensure `!path.isFirstPage( absUrl )`

**NB:** This bug has only arisen because I am bypassing jquery mobile navigation and using backbone's router.