sveltejs / sapper

The next small thing in web development, powered by Svelte
https://sapper.svelte.dev
MIT License
7k stars 434 forks source link

Dynamic parameters in routes containing spaces fails. #1781

Closed aldrino closed 3 years ago

aldrino commented 3 years ago

Bug Dynamic parameters encoded using [brackets] goes for a toss if the parameters passed has a space.

To Reproduce Use the latest sapper boilerplate.

npx degit "sveltejs/sapper-template#rollup" my-app
# or: npx degit "sveltejs/sapper-template#webpack" my-app
cd my-app
npm install
npm run dev

http://localhost:3000/blog/how-to-use-sapper - 200OK - Works image

http://localhost:3000/blog/how-to-usesapper - 404 - Works image

http://localhost:3000/blog/how-to-use%20sapper - 500 - Issue The spaces in the param causes the assets to break - find attached the trace below. Expected behaviour - the Assets should load with a 404 for the page. image

Stacktraces image

aldrino commented 3 years ago

PR - #1782