Componette

Componette

contributte

contributte / latte-email v3.0.0

💀 [DEPRECATED] Protect your email addresses in Latte template engine. Use contributte/latte.

download-cloud-line composer require contributte/latte-email

Website 🚀 contributte.org | Contact 👨🏻‍💻 f3l1x.io | Twitter 🐦 @contributte

Disclaimer

⚠️ This project is no longer being maintained. Please use contributte/latte.
Composer contributte/latte
Version
PHP
License

Versions

State Version Branch Nette PHP
dev ^3.1 master 3.0+ ^7.2
stable ^3.0 master 3.0+ ^7.2
stable ^2.0 master 2.4 >=5.6
stable ^1.2 master 2.4 >=5.4 (old namespace)

Usage 🎉

Setup

Register filter (in case you use nette/di)

services:
    nette.latteFactory:
        setup:
            - addFilter('email', 'Contributte\Latte\Helpers\EmailHelper::mailto')
            # or
            - addFilter('email', ['Contributte\Latte\Helpers\EmailHelper', 'mailto'])

Alternatively you can also add filter directly to template

use Contributte\Latte\Email\Helpers\EmailHelper;

public function createTemplate()
{
    $template = parent::createTemplate();
    $template->addFilter('email', [EmailHelper::class, 'mailto']);
}

Usage

{var $mail = "my@email.net"}

{$mail|email:"javascript"}
{$mail|email:"javascript_charcode"}
{$mail|email:"hex"|noescape}
{$mail|email:"javascript":"link to my email here"}
{$mail|email:"drupal"}
{$mail|email:"texy"}

Supported encoding methods

  • javascript
  • javascript_charcode
  • hex
  • drupal
  • texy

Development

This package was maintain by these authors.


Consider to support contributte development team. Also thank you for being used this package.

bar-chart-fill

Statistics

download-cloud-fill
19703
star-fill
6
bug-fill
0
flashlight-fill
3d
price-tag-2-line

Badges

guide-fill

Dependencies

php (^7.2)
latte/latte (~2.5.1)
nette/utils (~3.0.1)
Componette Componette felix@nette.org