[wp-trac] [WordPress Trac] #23578: URLs wrapped in <> parsed as HTML when wp_mail_content_type set to text/html
WordPress Trac
noreply at wordpress.org
Fri Feb 22 02:56:11 UTC 2013
#23578: URLs wrapped in <> parsed as HTML when wp_mail_content_type set to
text/html
--------------------------+------------------------------
Reporter: iandunn | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Mail | Version: 3.1
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by dd32):
> Using wp_mail_content_type to enable HTML e-mails is a common technique
documented on the Codex and across the Web. Is it considered a bad
practice to enable it globally -- as opposed to adding it before calling
wp_mail(), then removing it after; or just setting the content type in the
$headers param of wp_mail()? If so, we should document that on the Codex
and possibly in wp_mail() where the filter is applied.
IMHO, Yes, If you enable it globally, you also have to take into account
the fact that others use wp_mail, and '''expect''' to pass plain text
content to it, and you must therefor also process the plain text
accordingly with a filter or whatever is needed.
If a core change was made here, I'd be personally for detecting the HTML
mimetype in wp_mail, and running any plain text input to htmlentities(),
but that of course brings up questions of how to detect the content is
HTML or plain text.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23578#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list