[wp-trac] [WordPress Trac] #19808: PHPMailer -> MsgHTML single quote bug

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 11 18:02:03 UTC 2012


#19808: PHPMailer -> MsgHTML single quote bug
--------------------------+-----------------------------
 Reporter:  WPsites       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Mail          |    Version:  3.3.1
 Severity:  minor         |   Keywords:
--------------------------+-----------------------------
 If you pass in the contents of a HTML email to the MsgHTML method of the
 PHPMailer class it should attach all images to the email and replace the
 image src with the path to the attached image. If you use double quotes
 for the image src everything works fine.

 <img src="image.png" />

 If however you use single quotes (which as far as I'm aware is still part
 of the HTML spec for valid attributes) then the function doesn't replace
 any images or attach any of the images to the email like it's suppose to.

 The problem is down to two regular expressions that require double quotes.
 I have created a diff patch to fix those regular expressions, making both
 single and double quotes valid.

 So now both these work:

 <img src="image.png" /> and <img src='image.png' />

 I'm not sure what the protocol is regarding patches for external modules
 but thought I would mention the issue here. I have also sent the diff
 patch to the developer of the class as specified on Google code so if my
 patch is worthy (needed even) then the update might get into a future
 release of PHPMailer.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19808>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list