If you have a mailto link with multiple comma-separated e-mail addresses, SpamSpan doesn't work on the link. I've attached a patch (against the 6.x-1.x-dev release from 2009-Oct-11) to work around this.
Notes:
1) The output from spamspan.module is modified to look like:
<span class="spamspan">
<span class="u">test1</span> [at] <span class="d">test [dot] com</span>,
<span class="u">test2</span> [at] <span class="d">test [dot] com</span>,
<span class="u">test3</span> [at] <span class="d">test [dot] com</span>
</span>
2) spamspan.js has been modified to detect multiple "u" and "d" classes, and reconstruct multiple addresses as appropariate.
3) I haven't recompressed spamspan.js - the patch includes a change to spamspan.module to use the uncompressed version of the JS file.
4) I don't really like the way I've changed the regular expressions in spamspan.module to match multiple e-mail addresses, and how the constituent parts of the mail address are subsequently worked out from the $matches[] array. Suggestions for improvements are welcome :-)
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | spamspan-800562-8.x-2.x-test-only.patch | 1.04 KB | pookmish |
Issue fork spamspan-800562
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
penguin25 commentedUpdated the patch so that it applies cleanly to the 6.x-1.6 release.
It now also includes a compressed version of the JavaScript file.
Comment #2
peterx commentedDoes anyone still need this? There is no maintainer for the D6 version. I do not have D6 sites. When my sites want multiple outgoing email addresses, they are either separate to let the visitor choose or they go to a mail list address and the mail code expands the list.
Comment #3
peterx commentedIs there anyone out there who wants to maintain the Drupal 6 version of Spamspan?
Comment #4
peterx commentedI do not have D6 or a need for multiple addresses. You can reopen this for D7 if you still need it.
Comment #5
pookmish commentedThis is an issue on the 8.x-2.x version. I've changed the status to active and I'm adding the unit test to show it's failure coming from the filter format plugin. It would need to be fixed in the filter plugin and also the javascript to correct the issue.
Comment #6
pookmish commentedI correct myself. It's currently an issue on 1.x. The 2.x version appears to solve the problem. It doesn't actually obfuscate the emails, but at least they don't appear broken. Marking as closed again.