Telephone Filter

Categories

Component ID

2821732

Component name

Telephone Filter

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

395

Component created

Component changed

Component body

This is a simple module that provides a text filter designed to convert telephone numbers in text into clickable links using the href="tel:5555555" format. This is useful as most cell/mobile phones will automatically call phone numbers clicked from such links.

The module uses a regex that works on most U.S./Canadian style phone numbers.

If your text looks like this:

Call 555-555-5555 for details.

This module will convert it into this:

Call 555-555-5555 for details.

The code will look like this:
Call <a href="tel:5555555555">555-555-5555</a> for details.