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.
Example: <a href="https://github.com/helga-agentur/drupal-module-email-obfuscator/blob/2.x/mailto:test@email.com">
mailto:
is reversedmailto:
. 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
Example: <a>test@email.com</a>
display:none
containing a text with delimiters that are invalid email characters is added in the middle
of the emailfilter_var
function)$settings['email_obfuscator'] = [
'route_whitelist' => [
'rest.api_layout_footer.GET',
'editor.link_dialog'
]
];
editor.link_dialog
to avoid
obfuscating the email in the CKEditor link dialog.