wp-mail.php bug
-
Hey WP developers,
There’s a bug in current wp-mail.php which prevents it from correctly processing e-mails with subjects in quoted-printable encoding. In lines 53-55, we have this:
if (!preg_match(‘#\=\?(.+)\?Q\?(.+)\?\=#i’, $subject)) {
$subject = wp_iso_descrambler($subject);
}First of all, the regex check is incorrect – it should be
// No exclamation mark.
if (preg_match(‘#\=\?(.+)\?Q\?(.+)\?\=#i’, $subject)) {
$subject = wp_iso_descrambler($subject);
}Even more, however, – this regex check is unnecessary here, since it’s done (correctly) in wp_iso_descrambler () anyway. So these three lines have to simply be replaced with:
$subject = wp_iso_descrambler($subject);
I’ve found this bug while experimenting with the blogging via e-mail feature. After the fix, everything works beautifully.
Thanks for the great product!
- The topic ‘wp-mail.php bug’ is closed to new replies.