Closed (fixed)
Project:
SpamSpan filter
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Dec 2010 at 23:07 UTC
Updated:
5 Dec 2010 at 10:14 UTC
With the just released v1.5 none of the emails are converted back from "name [at] example [dot] com" format, and JS console shows an error:
Uncaught TypeError: Cannot call method 'replace' of null in spamspan.compressed.js
Plain text in the node is: [name@example.com].
When I substitute spamspan.js, the error is on line 34:
// Find the anchor text, and remove the round brackets from the start and end
var _anchorText = $("span." + Drupal.settings.spamspan.t, this).html().replace(/^ \((.*)\)$/, "$1");
Inspecting the statement in the debugger, .html() returns null.
I rewrote that as:
// Find the anchor text, and remove the round brackets from the start and end
o=$("span." + Drupal.settings.spamspan.t, this).html();
var _anchorText = o ? o.replace(/^ \((.*)\)$/, "$1") : '';
and the error is gone.
Comments
Comment #1
riisi commentedsubscribing
Comment #2
lakka commentedThanks for reporting this. I have fixed the problem by reverting this part of the code to an earlier version, reviving the much less important #723460 which I will work on separately.