Skip to content Skip to footer navigation
You are reading the Statamic 6 Alpha docs. πŸ‘€

Raw URL Encode Except Slashes Modifier

URL-encode a variable according to RFC 3986. Just like rawurlencode, but doesn't encode forward slashes (/).

example: please and thank you/Mommy
http://example.com/{{ example | rawurlencode_except_slashes }}
https://example.com/{{ Statamic::modify($example)->rawurlencode_except_slashes() }}
http://example.com/please%20and%20thank%20you/Mommy