stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.93k stars 172 forks source link

Webpublisher can not open when file when it has a whitespace in it escaped with %20 #1508

Open JohannesDienst-askui opened 2 months ago

JohannesDienst-askui commented 2 months ago

Describe the bug

Hello,

I have an odd problem with Webpublisher. Someone put whitespaces in folder names and filenames in our repository. Now when I create the link for Webpublisher it looks like this: https://pr.new/askui/askui-dev-docs/edit/main/docs/docs/general/03-Element%20Selection/aielement.md

It works for URLs without an escaped whitespace: https://pr.new/askui/askui-dev-docs/edit/main/docs/versioned_docs/version-0.20.7/general/05-Integrations/github-actions.md

Link to the blitz that caused the error

https://pr.new/askui/askui-dev-docs/edit/main/docs/docs/general/03-Element%20Selection/aielement.md

Steps to reproduce

  1. Find a file/folder in your repository that contains a whitespace
  2. Create a Webpublisher link for it

Expected behavior

Webpublisher should open the file in the editor on the left side

Parity with Local

Screenshots

image

Platform

Additional context

No response