Tom Taylor
2006-Nov-13 15:34 UTC
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Alan C Francis
2006-Nov-13 16:05 UTC
Re: Mass filtering page content for javascript anti-spam scr
Tom Taylor wrote:> Has anyone done anything like this, or know where I could start?Dan Bejamin''s hivelogic enkoder is available as a rails plugin. http://hivelogic.com/articles/2006/02/07/enkoder_plugin A. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jason Garber
2006-Nov-13 16:07 UTC
Re: Mass filtering page content for javascript anti-spam script
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, 10:34 am, "Tom Taylor" <scrap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Tom Taylor
2006-Nov-13 16:49 UTC
Re: Mass filtering page content for javascript anti-spam scr
On Nov 13, 4:05 pm, Alan C Francis <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Dan Bejamin''s hivelogic enkoder is available as a rails plugin.Amazing! Thank you! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Tom Taylor
2006-Nov-13 19:04 UTC
Re: Mass filtering page content for javascript anti-spam scr
On Nov 13, 4:49 pm, "Tom Taylor" <scrap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---