Hello.

I'm using spamspan module and when I type an email address in a node or in a comment it is obfuscated and everything is right.

The same does not apply for email addresses typed in blocks.
I noticed the necessary javascript script is not loaded and - naturally - not included in the generated html code of the page, UNLESS there is another email address in the content of the page: in this case everything is ok.

I tried to edit the php code of the modules, but I wasn't able to fix it.
Can anyone help ?

Thanks in advance.

andromeda

Comments

lakka’s picture

The spamspan module is a drupal filter. Like other drupal filters, it works by altering the text when you type it into a node edit form. Drupal does not call filters when it is rendering block content, so spamspan will not work for block content. The javascript is only loaded when needed, which may be why it works when there is an email address in a node, but not otherwise.

You might be able to get some functionality by making sure that the spamspan javascript is loaded for all pages (by using an onload hook), and that the email addresses within the blocks are in the form example [at] example [dot] com

Mardeg’s picture

Is it possible to make this more accessible for browsers with javascript turned off? Possibly using a method outlined at http://www.webmasterforums.net/resources-scripts/9217-making-obfuscated-... into the filter?