PHPackages                             joinbox/email-obfuscator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. joinbox/email-obfuscator

ActiveDrupal-module[Utility &amp; Helpers](/categories/utility)

joinbox/email-obfuscator
========================

Obfuscate emails any and everywhere

2.3.3(1y ago)0806[2 issues](https://github.com/joinbox/drupal-module-email-obfuscator/issues)[2 PRs](https://github.com/joinbox/drupal-module-email-obfuscator/pulls)GPL-2.0-or-laterPHP

Since Mar 29Pushed 1y ago2 watchersCompare

[ Source](https://github.com/joinbox/drupal-module-email-obfuscator)[ Packagist](https://packagist.org/packages/joinbox/email-obfuscator)[ RSS](/packages/joinbox-email-obfuscator/feed)WikiDiscussions 2.x Synced today

READMEChangelog (10)DependenciesVersions (30)Used By (0)

Drupal Module Email Obfuscator
==============================

[](#drupal-module-email-obfuscator)

The Drupal Email Obfuscator Module uses a middleware get rendered content from each request. The content is searched for emails with regexes. The emails are obfuscated depending on where the text is found.

Obfuscations
------------

[](#obfuscations)

### Emails in a Mailto-Link

[](#emails-in-a-mailto-link)

Example: ``

- The email string excluding `mailto:` is reversed
- An onfocus and an onmousedown are added which re-reverse the email after the `mailto:`. These two events cover the following cases: right-click, left-click and focus with tab. (onfocus would do it for most browsers, but Safari needs onmousedown.)

*The re-reverse is only done once in order to avoid reversing back to the reversed email*

### All other Emails

[](#all-other-emails)

Example: `test@email.com`

- A span with `display:none` containing a text with delimiters that are invalid email characters is added in the middle of the email

Exclusions
----------

[](#exclusions)

- Any email that is invalid (according to PHP's `filter_var` function)
- Everything in the backoffice (admin pages)
- Emails inside HTML-attributes (placeholder for input fields)
- Exclude Ajax webform request:
    - Because Ajax is usually used when sending a web form.
        This means that the request does not contain HTML, but a JSON object in which HTML is encoded with Unicode.
        The regex does not apply here and it is not necessary to obfuscate this email address as it is added by the sender.
- Content in routes that are whitelisted (see below)

### Whitelisting Routes

[](#whitelisting-routes)

- Define whitelisted (excluded) routes in settings.php ```
    $settings['email_obfuscator'] = [
      'route_whitelist' => [
        'rest.api_layout_footer.GET',
        'editor.link_dialog'
      ]
    ];
    ```
- **IMPORTANT:** If you are using CKEditor 4 you should whitelist the route `editor.link_dialog` to avoid obfuscating the email in the CKEditor link dialog.

### Disabling use of data-nosnippet

[](#disabling-use-of-data-nosnippet)

- The attribute data-nosnippet is used by default, to disable displaying the $displayNoneText in search results. It is possible to disable it in settings.php ```
    $settings['email_obfuscator'] = [
      'use_datanosnippet' => FALSE,
    ];
    ```
- **IMPORTANT:** The data-nosnippet attribute is officially supported ONLY by the Googlebot. Support from other bots is not guaranteed.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance48

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~42 days

Recently: every ~58 days

Total

20

Last Release

385d ago

Major Versions

1.1.1 → 2.2.02023-10-31

1.2.1 → 2.2.12023-11-14

1.3.0 → 2.3.12024-07-11

1.3.1 → 2.3.2-rc.12024-09-03

1.3.2-rc.1 → 2.3.2-rc.22024-10-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e6e5deaf463f95e6810009466d914313e1d4250d14d536ac63eda40db250bd7?d=identicon)[helga-agentur](/maintainers/helga-agentur)

---

Top Contributors

[![stefanospetrakis](https://avatars.githubusercontent.com/u/17128522?v=4)](https://github.com/stefanospetrakis "stefanospetrakis (8 commits)")[![hudsonmuff](https://avatars.githubusercontent.com/u/97090493?v=4)](https://github.com/hudsonmuff "hudsonmuff (6 commits)")[![jb-simon](https://avatars.githubusercontent.com/u/114908607?v=4)](https://github.com/jb-simon "jb-simon (4 commits)")

---

Tags

drupal-module

### Embed Badge

![Health badge](/badges/joinbox-email-obfuscator/health.svg)

```
[![Health](https://phpackages.com/badges/joinbox-email-obfuscator/health.svg)](https://phpackages.com/packages/joinbox-email-obfuscator)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
