PlastronJS icon indicating copy to clipboard operation
PlastronJS copied to clipboard

Router fails when token name has a space

Open gmkumar2005 opened this issue 13 years ago • 1 comments

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

gmkumar2005 avatar Jun 20 '12 05:06 gmkumar2005

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

rhysbrettbowen avatar Jul 24 '12 15:07 rhysbrettbowen