miranj / craft-obfuscator Goto Github PK
View Code? Open in Web Editor NEWA Craft CMS plugin that adds a Twig filter to obfuscate emails.
Home Page: https://plugins.craftcms.com/obfuscator
License: MIT License
A Craft CMS plugin that adds a Twig filter to obfuscate emails.
Home Page: https://plugins.craftcms.com/obfuscator
License: MIT License
When will you support and test the plugin for Craft 4?
https://craftcms.com/docs/4.x/extend/updating-plugins.html
Thank you!
Do you plan on updating the Plugin for Craft 5?
Thanks in advance.
Many Craft devs do not use git to pull in plugins into projects. It would be nice if you'd offer a downloadable version.
I get an error from the Obfuscator plugin whenever I update any plugin in Craft. I'm running Craft 3.1.12 and Obfuscator 1.0.2.
Stack trace:
#0 /Users/stevehurst/Sites/kalypso.craft.local/vendor/twig/twig/lib/Twig/Environment.php(672): Twig_ExtensionSet->addExtension(Object(miranj\obfuscator\twigextensions\ObfuscatorTwigExtension))
#1 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/web/View.php(299): Twig_Environment->addExtension(Object(miranj\obfuscator\twigextensions\ObfuscatorTwigExtension))
#2 /Users/stevehurst/Sites/kalypso.craft.local/vendor/miranj/craft-obfuscator/src/Obfuscator.php(32): craft\web\View->registerTwigExtension(Object(miranj\obfuscator\twigextensions\ObfuscatorTwigExtension))
#3 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/base/BaseObject.php(109): miranj\obfuscator\Obfuscator->init()
#4 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/base/Module.php(158): yii\base\BaseObject->__construct(Array)
#5 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/base/Plugin.php(127): yii\base\Module->__construct('obfuscator', Object(craft\web\Application), Array)
#6 [internal function]: craft\base\Plugin->__construct('obfuscator', Object(craft\web\Application), Array)
#7 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass->newInstanceArgs(Array)
#8 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('miranj\\obfuscat...', Array, Array)
#9 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('miranj\\obfuscat...', Array, Array)
#10 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/services/Plugins.php(897): yii\BaseYii::createObject(Array, Array)
#11 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/services/Plugins.php(230): craft\services\Plugins->createPlugin('obfuscator', Array)
#12 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/base/ApplicationTrait.php(1223): craft\services\Plugins->loadPlugins()
#13 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/web/Application.php(112): craft\web\Application->_postInit()
#14 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Application->init()
#15 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
#16 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/src/web/Application.php(100): yii\base\Application->__construct(Array)
#17 [internal function]: craft\web\Application->__construct(Array)
#18 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass->newInstanceArgs(Array)
#19 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('craft\\web\\Appli...', Array, Array)
#20 /Users/stevehurst/Sites/kalypso.craft.local/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('craft\\web\\Appli...', Array, Array)
#21 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/bootstrap/bootstrap.php(255): yii\BaseYii::createObject(Array)
#22 /Users/stevehurst/Sites/kalypso.craft.local/vendor/craftcms/cms/bootstrap/web.php(42): require('/Users/stevehur...')
#23 /Users/stevehurst/Sites/kalypso.craft.local/public/index.php(20): require('/Users/stevehur...')
#24 {main}```
Could you please increase the email regex limit to 8 ? Because I have several email address like [email protected] so the 2 last characters are out of tag. I made the change in my project but it could be useful to have it by default in case of update.
$this->email_regex = '[\w\d+_.-]+@(?:[\w\d_-]+\.)+[\w]{2,8}';
Thank you, it's a great plugin ! :)
Hi there,
just tried out your really helpful plugin. Much appreciated, thanks!
However, I noticed that the following code doesn’t obfuscate all email addresses as expected
{% filter enkode_emails %}
<a href="mailto:{{ recipient }}">
<span>{{ recipient}}</span>
</a>
{% endfilter %}
However, this makes it work:
{% filter enkode_emails %}{% spaceless %}
<a href="mailto:{{ recipient }}">
<span>{{ recipient}}</span>
</a>
{% endspaceless %}{% endfilter %}
So there might be a simple fix for that. The enkode
filter works like a charm though.
Cheers and thanks for your efforts,
Mark
This plugin works well with email addresses, but not with phone numbers (example: href="tel:+32412345678"
).
Is there any way to do so, or could you implement this feature please?
Hi, I don't know if this is an issue with the plugin or not but the email isn't being re-formatted, it's still showing as normal HTML when I inspect it. At first, I thought it was because it was on local when testing but when I pushed it to production it was still the same. How do you test to see if it's working locally? I tried a few of the examples in your docs but they didn't reformat.
Craft CMS 4.4.2
Obfuscator 1.1.1
Appreciate the help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.