I'm having the strangest problem. "Mailto" links with subjects work fine with SpamSpan in all browsers except IE (tested in 6, 7 and 8), where it adds parentheses around the processed link.
Code entered via CCK text field:
...please get in touch with our <a href="mailto:address@email.com?subject=Media%20request">media contact</a>.
Code as rendered by IE as copied from "view source":
...please get in touch with our <span class="spamspan"><span class="u">ntanner</span> [at] <span class="d">metalseconomics [dot] com</span><span class="h"> (subject: Media%20request) </span><span class="t"> (media contact)</span></span>.
So to the end user it looks like:
...please get in touch with our (media contact).
Any idea why this might happen? It's driving my client (and by extension me!) crazy.
Thanks in advance!!
Morgan
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | spamspan-ie-1009958-11.patch | 2.17 KB | Anonymous (not verified) |
| #8 | spamspan-1009958-8.patch | 2.14 KB | _toch |
Comments
Comment #1
lakka commentedI cannot test this because I do not have a copy of Windows. I suspect a problem/inconsistency in the way IE handles some of the javascript code (specifically the regular expression in line 34 of spamspan.js).
Please can you visit http://jsfiddle.net/XPr3j/9/ using IE. You should get an alert saying "Xmedia contactX". Let me know if you do (or don't)
Comment #2
mrogers commentedThanks, lakka. I see "X(media contact)X"; i.e., with parentheses inside the Xs.
Comment #3
lakka commentedThanks. Please can you try this one: http://jsfiddle.net/XPr3j/12/
If that works (and no parentheses are shown), I know what the problem is.
Comment #4
mrogers commentedSuccess -- no parentheses in the latest link!!
Comment #5
_toch commentedI confirm the bug and that the code of #5 resolves the issue: the alert contains "Xmedia contactX" with http://jsfiddle.net/XPr3j/12/ (tested with IE7 and IE8)
Comment #6
mrogers commentedWould it be possible to make a patch that applies the fix to the current version of the module? Thanks!
Comment #7
mrogers commentedSorry if I'm being dense, but could somebody explain how to apply the code in #3 to the module?
Comment #8
_toch commentedI've made a patch with the lakka's fix
Could you test it?
Comment #9
mrogers commentedThanks, _torch, but the parentheses still appear around the link.
Comment #10
somanyfish commentedI've reported a similar bug for the D7 version of this module and attached a patch.
Comment #11
Anonymous (not verified) commentedThis bug is present in all versions of IE < 9. Attaching a patch for this that should fix it.
The patch uses the same method from ln 28 of spamspan.js by adding a ? into the regex.
Comment #12
peterx commented1/ There is no maintainer for the D6 version.
2/ There issue is already reported in the D7 version and the fix should be backported from D7.
3/ See 1/.
Comment #13
avpaderno