开发者

DRUPAL: Spamspan module... how does it work?

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.开发者_Python百科org/viewvc/drupal/contributions/modules/spamspan/README.txt?view=co

thanks


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 user@example.com 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:
    user@example.com
  2. After Url Filter:
    <a href="user@example.com">user@example.com<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:user@example.com">user@example.com</a>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜