Making Invisimail Work with existing mailto: links
jrust - December 15, 2007 - 18:18
| Project: | Invisimail |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Currently Invisimail only picks up email addresses that are not already mailto: links. It does not pick up and encode addresses that have been made into a mailto: link via another filter or something like TinyMCE. This patch adds the functionality of also encoding the addresses in those existing links.
| Attachment | Size |
|---|---|
| invisimail_links.patch | 2.72 KB |

#1
I've attached an updated version of the patch which has a speed improvement and removes a couple lines of testing code.
#2
Has this been committed to the latest version? This is a terrific patch that provides essential functionality.
#3
I've attached a new version of the patch for the recently released 1.0 version of Invisimail. It also fixes a bug where if the text consists of solely an email address or the email address is in a table cell it wasn't getting encoded.
#4
Is this for D5 or D6? The D5 version is in maintenance mode, so I'm only looking at D6 feature improvements. (Of course, it's not like this module has much difference between the two...)
#5
It patched against 5.x-1.0 just fine for me, thanks jrust!
It would be very nice if this patch was merged with both D5 and D6. It would reduce some of the complexity on our side when it comes time to merging our custom branches with the official module later on down the road.
#6
Attached is a patch for the 6.x branch.
#7
An updated version of the patch is attached.
#8
OK, trying to get back to module maintenance...
1) Don't name a function "invisimail_callback2". That says nothing about what it does or why it does it or how it's used. It should have a real name. (Arguably so should invisimail_callback, then, which can be done in the same patch.)
2) I'm going to hope you've tested the regexes, because I can't even begin to comprehend them. :-)
#9
Good ideas. I've updated the patch with clearer function calls. And, yup, I've tested the regexes. The first one looks for a mailto: link and encodes it. The second one is similar to what was there before, except that it now handles two new cases: when an email address is at the beginning of the line and when an email address is inside a table cell.
#10
#11
#12
Here's the patch to work with the current version of invisimail. It seems to work great.
#13
What was wrong with the patch in #9? Please don't set your own patches RTBC. Someone else needs to review them first.
#14
Another patch addressed this issue already.
#15
Automatically closed -- issue fixed for 2 weeks with no activity.