janthomas89/mailsafe
Composer 安装命令:
composer require janthomas89/mailsafe
包简介
simple symfony 2 bundle to output an email in a spam safe way
README 文档
README
Simple symfony 2 bundle to output an email in a spam safe way
How it works?
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.
<span data-mailsafe="WyJlZC5lcmF3dGZvcy1zYW1vaHRuYWpAb2ZuaSIsIiJd"></span>
To display a human readable version of this email the span is replaced via javascript.
How to use?
Include @JanThomas89MailSafeBundle/Resources/public/js/mailsafe.jquery.js in your template. Then use the twig filter "mailsafe" whenever you want to output an email.
{{ "example@example.com" | mailsafe }}
WARNING This script requires base64 support in browser. If you need to support other browsers (e.g. <IE10) use polyfill
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-29