Mac Mail and old Outlook emails not being cleaned properly
sagannotcarl - October 7, 2009 - 00:48
| Project: | Mail Comment |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I realized today that my issue at #466446: Upgrade breaks message cleaning was really due to the fact that Mac Mail changed what is inserted above the quoted text to use a name instead of an email (at least for me). Here is a patch that adds a second mac mail check that's a little looser. Regex is definitely not my thing so if anyone has a suggestion to make it more specific I'd be happy. I also added a line for some old versions of outlook that wasn't being caught.
For reference here are the regex's that have been added with this patch:
'mac_mail_2' => "/On [A-Z][a-z]{2} [0-9]{1,2}, [0-9]{4}, at [0-9]{1,2}:[0-9]{2} [AP]M,/",
'outlook_legacy' => '/From:(\s*)[A-Za-z0-9._%+-]+@[A-Za-z0-9._%+-]+\.[A-Za-z]{2,3}(\s*)\[mailto:[A-Za-z0-9._%+-]+@[A-Za-z0-9._%+-]+\.[A-Za-z]{2,3}\]/',This patch is for the mail2web_extras module.
| Attachment | Size |
|---|---|
| mail2web_extras.module.patch | 1.62 KB |

#1
#2
Committed, thanks Colin.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.
#4
Switch to mailcomment project. Mail2web is now known as "mailcomment" due to a trademark issue with the name mail2web.