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

CommentFileSizeAuthor
#11 spamspan-ie-1009958-11.patch2.17 KBAnonymous (not verified)
#8 spamspan-1009958-8.patch2.14 KB_toch

Comments

lakka’s picture

I 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)

mrogers’s picture

Thanks, lakka. I see "X(media contact)X"; i.e., with parentheses inside the Xs.

lakka’s picture

Thanks. 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.

mrogers’s picture

Success -- no parentheses in the latest link!!

_toch’s picture

I 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)

mrogers’s picture

Would it be possible to make a patch that applies the fix to the current version of the module? Thanks!

mrogers’s picture

Sorry if I'm being dense, but could somebody explain how to apply the code in #3 to the module?

_toch’s picture

StatusFileSize
new2.14 KB

I've made a patch with the lakka's fix

Could you test it?

mrogers’s picture

Thanks, _torch, but the parentheses still appear around the link.

somanyfish’s picture

I've reported a similar bug for the D7 version of this module and attached a patch.

Anonymous’s picture

Title: Parentheses around links -- only in IE » Parentheses around links - IE < 9
Version: 6.x-1.6 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new2.17 KB

This 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.

peterx’s picture

Issue summary: View changes
Status: Needs review » Closed (cannot reproduce)

1/ 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/.

avpaderno’s picture

Issue tags: -IE, -parentheses