[wp-trac] [WordPress Trac] #16859: esc_url eats square brackets.

WordPress Trac wp-trac at lists.automattic.com
Tue May 29 13:52:56 UTC 2012


#16859: esc_url eats square brackets.
------------------------------------+------------------------------
 Reporter:  f00f                    |       Owner:  westi
     Type:  defect (bug)            |      Status:  accepted
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  General                 |     Version:  3.1
 Severity:  minor                   |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------------

Comment (by nacin):

 Per RFC 1738, brackets are considered "unsafe", and are not reserved, and
 should therefore always be encoded.
 http://tools.ietf.org/html/rfc1738#section-2.2

 But per RFC3986, they are now a reserved gen-delimiter character, which
 means it would not be in our best interest to blindly encode all of the
 ones we find: http://tools.ietf.org/html/rfc3986#section-2.2. It is
 designed for wrapping an IPv6+ address for the host, according to
 http://tools.ietf.org/html/rfc3986#section-3.2.2. This is actually okay,
 as we can pretty easily avoid targeting the host. That it is a reserved
 character with a specific meaning allows us to make this change in a more
 future-proof way.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16859#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list