netlify / netlify-playground

https://play.netlify.com
MIT License
89 stars 16 forks source link

Don't urlescape ":splat" #23

Closed Pilskalns closed 6 years ago

Pilskalns commented 6 years ago

- Do you want to request a feature or report a bug? A bug.

- What is the current behavior? Playground generates rule for netlify.toml with url-escaped : as %3Ain path, which shouldn't be.

- If the current behavior is a bug, please provide the steps to reproduce. Test following syntax:

http://domain.com/* https://domain.com/:splat/

And output will be:

[[redirects]]
from = "http://domain.com/*"
to = "https://domain.com:443/%3Asplat"
status = 301
force = true

This will redirect literally to https://domain.com/%3Asplat

- What is the expected behavior? The output path shouldn't be url-escaped:

[[redirects]]
from = "http://domain.com/*"
to = "https://domain.com:443/:splat"
status = 301
force = true
calavera commented 6 years ago

ugh, thanks for reporting this 👍

JokerQyou commented 6 years ago

Actually all placeholders are currently urlencoded, not only the :splat.