Hi guys,
I have built a module that replaces all email addresses on the website with a link to a contact form for spam protection.
<a href="/link/to/contact/form/with/encoded/email/address" title="E-Mail not shown if javascript is disabled." rel="nofollow" class="contact replacetext">[E-Mail via form]</a>
This link is then reversed to a mailto-link using javascript.
In SS2.4 and 3 I used to do the replacement in the forTemplate() method of the DBField classes (Varchar, Text, HTMLVarchar, HTMLText). This way all emails shown on the website were replaced and I was still able to use $Field.RAW where the email address had to stay.
Now in SS3.1 the RAW doesn't work anymore, meaning that the email addresses still get re-written.
Does anyone have an idea why RAW does behave this way in SS3.1?
Can anyone give me a hint where to do the rewrite other than the forTemplate() method of the DBField classes? Is there a way to somehow inject something like a rewrite_hash_links or something similar to shortcodes?
Thank you very much!