Mass filtering page content for javascript anti-spam script

Hi all,

I’d like to write a function that replaces all email addresses in my
pages with a javascript anti-spam script. I know it’s a bit horrible
for screen readers, but I feel it’s our best option at the moment.

I think I need some kind of function that builds the javascript
depending on the email address and then replaces it in the text. I got
a bit lost at this point!

All of the page content is written in Markdown, fetched from the
database, and is edited regularly by the site users.

Has anyone done anything like this, or know where I could start?

Thanks a lot,

Tom

Tom T. wrote:

Has anyone done anything like this, or know where I could start?

Dan Bejamin’s hivelogic enkoder is available as a rails plugin.

A.

I wrote a plugin that automatically adds an enkoded (Hivelogic Enkoder
is Javascript eval) hidden field to prevent spam. Perhaps not that
relevant to what you’re trying to do, but thought I’d throw it out
there.
http://www.agilewebdevelopment.com/plugins/form_spam_protection

On Nov 13, 4:05 pm, Alan C Francis [email protected]
wrote:

Dan Bejamin’s hivelogic enkoder is available as a rails plugin.

Amazing! Thank you!

On Nov 13, 4:49 pm, “Tom T.” [email protected] wrote:

Amazing! Thank you!

Actually, it appears that’s a little overkill for what I want. That
encodes an entire page of content, and I just want to encode the email
addresses. There must be some kind of regexp I could use?