scope
scope copied to clipboard
GitHub comment encoding (and maybe others), break scope urls.
- Navigate around scope.
- Select all in url bar, cmd-c. Chrome encodes
"->%22. - Paste into github comment.
- Flip to preview mode. Hover url. Github has automatically linkified the url but encoded
{->%7B. - Click url, goes through to scope, scope can't decode state, gives up and falls back to whatever it finds in localstorage. or failing that back to clean slate.
Example:
https://myscopehost#!/state/{%22gridSortedBy%22:%22docker_memory_usage%22,%22gridSortedDesc%22:true,%22topologyId%22:%22kube-controllers%22,%22topologyOptions%22:{%22pods%22:{%22namespace%22:[%22sock-shop%22,%22loadtest%22]}}}
Just wrapping our url parsing in a decodeURIComponent might do the trick.