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

URL Encode Except Slashes Modifier

URL-encodes a string. Just like urlencode, but doesn't encode forward slashes (/).

string: please and thank you/Mommy
{{ string | urlencode_except_slashes }}
{!! Statamic::modify($string)->urlencode_except_slashes() !!}
please+and+thank+you/Mommy