[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
Wed Jan 18 05:28:40 UTC 2017
#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: 4.8
Component: Mail | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------
Changes (by SergeyBiryukov):
* milestone: Awaiting Review => 4.8
Comment:
Replying to [comment:6 iandunn]:
> Since retrieve_password() is the only Core function that wraps URLs in
<>, then I think just making it aware of the content-type is a good
solution until everything is converted over to HTML.
`wp_new_user_notification()` [source:tags/4.7.1/src/wp-
includes/pluggable.php?marks=1791#L1777 does the same] since [33023], and,
since it's a pluggable function, potentially any plugin that overrides it
would use angle brackets as well.
[attachment:23578.diff] is a step in the right direction, but I don't
think `retrieve_password()` is the right place for this fix:
* `nl2br()` makes the message more readable, but it would be inconsistent
with other core emails if `wp_mail_content_type` is set to `text/html`
globally.
* As noted above, it doesn't fix plugins that might override
`wp_new_user_notification()` or wrap URLs in angle brackets in their own
emails.
I think we should deal with it in `wp_mail()`, see
[attachment:23578.2.diff].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23578#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list