dev-master
9999999-dev https://github.com/janthomas89/mailsafesimple symfony 2 bundle to output an email in a spam safe way
MIT
The Requires
- php >=5.3
by Jan Thomas
mail email encryption spam encoding safe spamsafe
Wallogit.com
2017 © Pedro Peláez
simple symfony 2 bundle to output an email in a spam safe way
Simple symfony 2 bundle to output an email in a spam safe way, (*1)
In order to hide an email address for spam bots, mailsafe renders a span element instead of the raw email address. The spans data-mailsafe attribute represents a reversed and base 64 encoded version of the email address., (*2)
<span data-mailsafe="WyJlZC5lcmF3dGZvcy1zYW1vaHRuYWpAb2ZuaSIsIiJd"></span>
To display a human readable version of this email the span is replaced via javascript., (*3)
Include @JanThomas89MailSafeBundle/Resources/public/js/mailsafe.jquery.js in your template. Then use the twig filter "mailsafe" whenever you want to output an email., (*4)
{{ "example@example.com" | mailsafe }}
WARNING This script requires base64 support in browser. If you need to support other browsers (e.g. <IE10) use polyfill, (*5)
simple symfony 2 bundle to output an email in a spam safe way
MIT
mail email encryption spam encoding safe spamsafe