scope icon indicating copy to clipboard operation
scope copied to clipboard

GitHub comment encoding (and maybe others), break scope urls.

Open foot opened this issue 7 years ago • 1 comments

  1. Navigate around scope.
  2. Select all in url bar, cmd-c. Chrome encodes " -> %22.
  3. Paste into github comment.
  4. Flip to preview mode. Hover url. Github has automatically linkified the url but encoded { -> %7B.
  5. 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]}}}

foot avatar May 23 '18 08:05 foot

Just wrapping our url parsing in a decodeURIComponent might do the trick.

foot avatar Oct 11 '18 07:10 foot