jweiland / mail-link-fixer
Mail Link Fixer (EXT:mail_link_fixer) - CLI command to fix javascript:linkTo_UnCryptMailto() hrefs in RTE Fields
Package info
github.com/jweiland-net/mail_link_fixer
Type:typo3-cms-extension
pkg:composer/jweiland/mail-link-fixer
Requires
- php: ^8.2
- typo3/cms-core: ^13.4 || ^14.3
Requires (Dev)
- ergebnis/composer-normalize: ^2.44
- ssch/typo3-rector: ^3.6
- typo3/coding-standards: ^0.8
- typo3/testing-framework: ^9.2.0
This package is auto-updated.
Last update: 2026-06-05 10:09:17 UTC
README
This extension provides a CLI command to migrate legacy javascript:linkTo_UnCryptMailto() links in the database into standard mailto: links, allowing modern TYPO3 versions (v12/v13) to natively handle frontend spam protection.
1 Features
- Safely reverses legacy Caesar-cipher encrypted email links directly in the database.
- Rebuilds broken
<a href="javascript:...">tags into standard<a href="mailto:...">tags. - Dynamically scans the global TYPO3 TCA to find and process all Rich Text (RTE) and standard text fields.
- Includes a robust
--dry-runmode to preview changes without altering database records.
2 Usage
2.1 Installation
Installation using Composer
The recommended way to install the extension is using Composer.
Run the following command within your Composer based TYPO3 project:
composer require jweiland/mail-link-fixer
2.2 Command Usage
The extension registers the following CLI command via the TYPO3 Console:
vendor/bin/typo3 mail_link_fixer:fix-spam-email [options]
Options
| Option | Short | Description |
|---|---|---|
--dry-run |
Preview changes without writing to the database. | |
--uid=<UID> |
Process only the tt_content record with this UID. |
|
--table=<table> |
-t |
Specific table to process (default: tt_content). |
--field=<field> |
-f |
Specific field to process (default: bodytext). |
--all-rte |
Scan all tables and fields in TCA configured with enableRichtext=true. |
Examples
Preview all changes without touching the database:
vendor/bin/typo3 mail_link_fixer:fix-spam-email --dry-run
Fix a single record by UID:
vendor/bin/typo3 mail_link_fixer:fix-spam-email --uid=42
Process a specific table and field:
vendor/bin/typo3 mail_link_fixer:fix-spam-email --table=tx_myext_domain_model_news --field=bodytext
Scan and fix all RTE fields across the entire TCA:
vendor/bin/typo3 mail_link_fixer:fix-spam-email --all-rte
Combine --all-rte with --dry-run for a safe full-site preview:
vendor/bin/typo3 mail_link_fixer:fix-spam-email --all-rte --dry-run
Add -v for verbose output that shows the number of replacements per record:
vendor/bin/typo3 mail_link_fixer:fix-spam-email --all-rte -v