Replace strings systemwide before rendering in the browser

Is it possible to replace strings systemwide right before rendering in browser?
there came an idea into my mind to replace every (clickable-)mailadress on the site by a modal-contact-form =)

pre-rendering hook with preg match + sed? =)

If you are running an Apache webserver, mod_substitute would be the way to go. See:

I think the more important question here is what is your motivation behind this move and whether this makes sense from a user’s point of view (and not from protecting your email addresses). Of course, clickable email addresses are of no use to users who don’t use an email client.

Nevertheless, I think you would have to find out if your target group accepts contact forms or not. After all, contact forms usually mean less control over mails the user has sent (track when you have sent what to whom with what content).

If I can avoid it, I never fill out contact forms.

The usecase is a big non-profit-proces with many non-techi-persons in different groups. Most of them are not techi enough to handle more then their private-mailaddress (some of them have enough difficulties with those private mailadresses at first =) ). and for sure, we don’t want to share their private-mailaddresses on the website in an open way. Using a webform is a choice about “low threshold” for all envolved persons - incl. Admins =) We have own group-mailadresses for some of the main-groups. but there are several groups starting and stopping-work… so there is high fluctuation and also these groups don’t have always a unique name… after all: it’s unpracticaly to implement forwarding-mailadresses for them and it would be much meta-work for us admins.

so… yes, it is also for protecting mailadresses but also for avoiding to much work for us admins =)

A global replacement optipn would also make centralised management of abbreviations possible for the whole site.