Does not appear to work

dirkson - August 19, 2008 - 21:25
Project:Invisimail
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

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.

#1

suit4 - February 5, 2009 - 16:01
Status:active» needs review

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

AttachmentSize
invisimail-fixed-regex.0.patch 768 bytes

#2

Crell - March 31, 2009 - 22:16

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

#3

Crell - March 31, 2009 - 22:48
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. :-)

#4

bwv - April 6, 2009 - 14:07

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.

#5

Crell - April 6, 2009 - 16:08

Yep, it's fixed.

#6

System Message - April 20, 2009 - 16:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.