Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifier rawurlencode does not encode forward slashes - contrary to documentation #1603

Open
jonatanalvarsson opened this issue Feb 4, 2025 · 0 comments

Comments

@jonatanalvarsson
Copy link

The example in the docs at https://statamic.dev/modifiers/rawurlencode states that:

...given the following YAML-data:

example: please and thank you/Mommy

...and the following Antlers-code:

http://example.com/{{ example | rawurlencode }}

...you will get the following HTML output:

http://example.com/please%20and%thank&20you%2FMommy

But the actual HTML output is (notice the un-encoded forward slash before "Mommy"):

http://example.com/please%20and%20thank%20you/Mommy

...since Statamic\Modifiers\CoreModifiers::rawurlencode() does not encode forward slashes /.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant