Phoney
This module protects phone numbers from spam bots by encrypting and obscuring them, then using JavaScript in the browser to decode them into clickable links. It offers an input filter and a field formatter for telephone and text fields.
This module provides an input filter and field format that protects telephone numbers from spam bots while being visible by humans.
The filter encrypts and then obscures the phone number behind a data-attribute. The HTML is then decrypted and rewritten in the client browser via JavaScript back into a clickable phone link, (there is no non-JavaScript fallback).
A field formatter for telephone and/or text fields was added to the 2.1.x version, (Drupal 11 only).
Currently the display format used is compatible with US 10 digit telephone numbers, (234) 456-7890.
Original phone link:<a href="tel:2344567890">2344567890</a>
Encoded phone link: <a href="#" data-phone-to="EFGGHIJKLC" data-replace-inner="@phone">@phone</a>
JavaScript decoded link: <a href="tel:2344567890">(234) 456-7890</a>
The Obfuscate Email module does something similar for email addresses, (and was an inspiration for this module).
Depends on
Dependencies of the latest stable release
- field Drupal core
- filter Drupal core
- text Drupal core
- views Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 2.1.0 | Stable | 11 | Added field formatter to work with string and telephone fields. | Mar 10, 2026 | |
| 2.1.0-beta1 | Pre-release | 11 | Updated classes to use strict_types. | Mar 8, 2026 | |
| 2.1.0-alpha1 | Pre-release | 11 | Added field formatter for telephone and text fields. | Feb 15, 2026 | |
| 2.0.1 | Stable | 9–11 | Oct 14, 2024 |