[wp-trac] [WordPress Trac] #34958: esc_url() and parse_url() do not work together.

WordPress Trac noreply at wordpress.org
Wed Jan 20 09:44:37 UTC 2016


#34958: esc_url() and parse_url() do not work together.
-------------------------------+----------------------
 Reporter:  damiankaelgreen    |       Owner:
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Formatting         |     Version:  4.4
 Severity:  normal             |  Resolution:  invalid
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+----------------------
Changes (by dd32):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 as above, `esc_url()` is designed for outputting within HTML, as such it
 escapes `&` to the HTML entity `&` to conform to XHTML
 specifications.

 `esc_url_raw()` can be used when the url is to be used programmatically
 (such as by `parse_url()` or within a `header()` call)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34958#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list