mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-21 04:48:06 -05:00
@@ -819,7 +819,7 @@
|
||||
};
|
||||
|
||||
// Cached regex for cleaning leading hashes and slashes .
|
||||
var routeStripper = /^[#\/]/;
|
||||
var routeStripper = /^[#/]/;
|
||||
|
||||
// Cached regex for detecting MSIE.
|
||||
var isExplorer = /msie [\w.]+/;
|
||||
|
||||
@@ -200,4 +200,12 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
test("#933, #908 - leading slash", function() {
|
||||
var history = new Backbone.History();
|
||||
history.options = {root: '/root'};
|
||||
equal(history.getFragment('/root/foo'), 'foo');
|
||||
history.options.root = '/root/';
|
||||
equal(history.getFragment('/root/foo'), 'foo');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user