PlastronJS
PlastronJS copied to clipboard
Router fails when token name has a space
With small tokens the routes work properly on FF and chrome. With long ones eg 'User Master' it fails on FF. There is a difference in the way token is handled in these browsers. Chrome internally performs html escape but FF apparently does not. Below test case fails in FF. Not tested on IE
var testNavigation = function(){
var reached = false;
var a = function() {reached = true;};
waitForEvent(router.history_, goog.history.EventType.NAVIGATE,
function() {
assert(reached);
});
// works in chrome, In FF it needs to be escaped 'test%20link'
router.route('test link', a);
// works in chrome, In FF it needs to be escaped 'test%20link'
router.navigate('test link');
};
Please help
might be something that need sot be fixed in closure library - but can definitely put escaping in the router. Just wonder where it's best to change it. I'll look in to it and bring it up in the closure library discussion board