OCTOBERCMS Obfuscate an email address with html_email

Viewed 139

i wanna obfuscate an email address to prevent spam-bots from sniffing it on my contact page.

I tried to use html_email function in href but the email address remained unchanged.

E-mail: <a href="mailto:{{ html_email('example@mail.com')| raw }}">My email</a>

Anyone have any idea why the html_email function doesn't work. Maybe another solution to obfuscate a email address in october?

1 Answers

It is working. If you look at the source file it is obfuscated. I believe bots sniff the source file. You are looking at the rendered html which displays the email correctly. Also if you use google chrome you can do ctrl-u to look at the source file. Firefox I just right click and click on view source and etc with more browsers.

This is the image of my source file.

Related