Problem/Motivation
When a mailto: link's visible text contains an HTML special character (e.g. <a href="mailto:x@example.com">Life & Work Connections</a>)ObfuscateEmail::process() silently deletes the link's text content. The anchor tag survives, but ends up empty.
<!-- before -->
<a href="mailto:x@example.com">Life & Work Connections</a>
<!-- after obfuscate_email filter runs -->
<a href="#" data-mail-to="..." data-replace-inner="@email"></a>
Steps to reproduce
1. Enable the "Obfuscate Email" filter on a text format.
2. Create content with a mailto link whose visible text contains an ampersand, e.g.: <a href="mailto:test@example.com">Sales & Support</a>
3. Save and view the rendered output.
4. Observe the anchor tag is present but its inner text has been deleted.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork obfuscate_email-3608072
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
aaronchristian commentedComment #3
aaronchristian commentedComment #6
b_sharpe commentedthanks