views:

146

answers:

1

hi,

I've installed http://drupal.org/project/spamspan module for Drupal (drupal.org/project/spamspan), in order to obfuscate the e-mail addresses on my website.

However I'm not sure it is working. I can see the email url from source html and I think the module is not filtering anything.

I've added some e-mails in the text editor CKEditor. Is it automatically detecting these emails written in text editor ?

I've followed the instructions here: http://drupalcode.org/viewvc/drupal/contributions/modules/spamspan/README.txt?view=co

thanks

A: 

Since you followed the directions, I assume you enabled the SpamSpan filter for your input formats.

Make sure you set SpamSpan to run after the URL filter. I generally reorder my input formats so that SpamSpan is near the bottom (one of the last filters to run). SpamSpan searches for email links [email protected] and replaces them with user [at] example [dot] com, and uses javascript to turn it back into a normal-looking link in the browser.

Edit 1: I had some trouble getting SpamSpan to work properly at first, and part of the problem was that I needed to clear the cache.

Edit 2: One of my input formats is ordered as such:

  1. Line break converter
  2. HTML filter
  3. URL filter
  4. Hide email addresses using the SpamSpan technique
  5. HTML corrector

Edit 3: Here is an example of how SpamSpan should be working:

  1. Original body text:
    [email protected]
  2. After Url Filter:
    <a href="[email protected]">[email protected]<a/>
  3. After SpamSpan filter (as seen in page source):
    <span class="spamspan"><span class="eu">user</span> [at] <span class="ed">example [dot] com</span></span>
  4. After SpamSpam javascript runs on the page (as seen via Firefox's View Selection Source):
    <a class="spamspan" href="mailto:[email protected]">[email protected]</a>
Greg
hi, thanks for reply. 1) I only have FUll / Filtered HTML as "Input formats" and Filtered HTML is enabled. (I enabled the Spanspan filter inside it. 2) The cache is disabled and I've just cleaned it again to be sure. 3) This is my filters order (increasing weights): URL filter, HTML filter, Line break converter, HTML corrector, Hide email addresses using the SpamSpan technique4) What should I exactly see when the filter works ? This is my current (not filtered I guess) code: <a href="mailto:[email protected]" class="email">[email protected]</a>
Patrick
@Patrick - Given the output you describe, it would seem that SpamSpan isn't working. I edited my answer to include an example of what kind of output you should see. Try setting up a filter exactly how I described in `Edit 2` and see if that works. If so, make one change at a time until you find out why it breaks. I have a feeling filter order is the problem.
Greg

related questions