Setting the options, enabling the filter, then testing an email address, I'd be hard pressed to say that the module is doing anything obserable.

CommentFileSizeAuthor
#1 invisimail-fixed-regex.0.patch768 bytessuit4

Comments

suit4’s picture

Status: Active » Needs review
StatusFileSize
new768 bytes

same here.

just debugging invisimail.module and digging into it.

As far as I can see by now, the additions (e.g. using javascript) made by invisimail are being removed by the HTML-Filter afterwards, as it does not allow

-Tags and HTML-comments Placing invisimail filter after the HTML-Filter, the regex pattern to strip the email adresses does not apply anymore. So instead of
$pattern = "!(<p>|<li>|<br />|[ \n\r\t\(])([A-Za-z0-9._-]+@[A-Za-z0-9._-]+\.[A-Za-z]{2,4})([.,]?)(?=(</p>|</li>|<br />|[ \n\r\t\)]))!i";
it could be simply
$pattern ="!([A-Za-z0-9._-]+@[A-Za-z0-9._-]+\.[A-Za-z]{2,4})([.,]?)!i";
but I guess this will break some stuff ..... So, after poking around with the regex, I found this one working, which is only slightly modified:
$pattern = '!(<p>|<li>|<br />|[\s\(]|)([A-Za-z0-9._-]+@[A-Za-z0-9._-]+\.[A-Za-z]{2,4})([.,]?)(?=(</p>|</li>|<br />|[\s/)]|))!i';
There are extra | between the first and the last brackets to catch email adresses at the first or last line of a text block. As far as the HTML-Corrector filter again breaks invisimails output, invisimail has to be repositioned to be after HTML-Filter and HTML-Corrector and before URL-Filter. Patch attached
Crell’s picture

OK, I'm confused. What exactly is the problem and how does this fix it?

Crell’s picture

Status: Needs review » Fixed

OK, #176498: invisimail doesn't filter when it should.. looks like almost the same patch and has a better description of the problem. So it's specifically at the start/end of a field that the regex breaks. I've committed the patch in #1 to the 6.x branch. Please test the dev release and see if it actually works. :-)

bwv’s picture

I am using this module and can verify that it is working (at least I think it is). Would someone here be so kind as to go to this page:

http://ads.classicvinyl.biz/text-ad/20th-century/jazzantiqua

Click on the contact tab, then view source.

I have javascript obfuscation set up.

Thanks, david h.

Crell’s picture

Yep, it's fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.