[wp-trac] [WordPress Trac] #18463: wp_mail() does not allow"<address at tld.com>", regression
WordPress Trac
wp-trac at lists.automattic.com
Wed Aug 17 20:23:03 UTC 2011
#18463: wp_mail() does not allow"<address at tld.com>", regression
--------------------------+-----------------------------
Reporter: kitchin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.2.1
Severity: normal | Keywords: needs-codex
--------------------------+-----------------------------
This regression was caused by '''Ticket #17305: wp_mail() does not
accommodate address format "Name <address at tld.com>"'''.
The format "<address at tld.com>" no longer works, it has to be
"address at tld.com". In Ticket #17305 Comment 12 commenter Pavelevap says
this is a regression.
I explained already in Ticket #17305 Comment 11 why the new regex is not
optimal (greediness), and I provided a new regex:
patch was: '/(.+)\s?<(.+)>/'
should be: '/(.*)<(.+)>/'
I called it an enhancement, because the new regex would make
"<address at tld.com>" work without a "Name" in front. But it seems actually
to fix a regression.
For belt-and-suspenders, trim() can be applied to the results, as it is
now, though the call to AddAnAddress() actually does the trim() anyway.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18463>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list