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
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.

AttachmentSize
mail2web_extras.module.patch1.62 KB

#1

sagannotcarl - October 7, 2009 - 00:50
Title:More/Updated Message cleaning regular expressions» Mac Mail and old Outlook emails not being cleaned properly

#2

Ian Ward - October 12, 2009 - 16:37
Status:needs review» fixed

Committed, thanks Colin.

#3

System Message - October 26, 2009 - 16:40
Status:fixed» closed

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

#4

Ian Ward - November 16, 2009 - 17:59
Project:Mail to Web» Mail Comment
Version:6.x-1.x-dev» 6.x-1.x-dev

Switch to mailcomment project. Mail2web is now known as "mailcomment" due to a trademark issue with the name mail2web.

 
 

Drupal is a registered trademark of Dries Buytaert.