satnav-js
satnav-js copied to clipboard
Spaces screw up SatNav
While completely valid in the URL spaces (or any URL encoded character actually) screw up SatNav.
While looking at this I noticed that line 81 reads:
return '([\\w-.]+)?';
But since spaces get encoded to a + the above breaks. Taking into account also that special characters could be encoded with a % symbol, below makes more sense:
return '([\\w-.+%]+)?';
But, really, what we are interested in is anything that isn't {} or /, so why not use:
return '([^{}\\/]+)?';
I will look into this shortly.
If you would like submit a PR, I would be happy to test and merge :)
No problem, PR listed above.
nice @jdarling