Skip to content Skip to footer navigation

Obfuscate Modifier

Replaces characters in a string with a mixture of HTML entities. The text appears unchanged in the browser. This is often used for email addresses, but bots that decode HTML can still read them.

magic_word: Abracadabra
{{ magic_word | obfuscate }}
{!! Statamic::modify($magic_word)->obfuscate() !!}
# visibly appears as Abracadabra
Abracadabra