[wp-trac] [WordPress Trac] #55852: Reverse wrapping of `sanitize_url()` and `esc_url_raw()`.

WordPress Trac noreply at wordpress.org
Fri May 27 02:56:30 UTC 2022


#55852: Reverse wrapping of `sanitize_url()` and `esc_url_raw()`.
---------------------------+-----------------------------
 Reporter:  peterwilsoncc  |      Owner:  (none)
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Formatting     |    Version:
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 In WordPress 5.9 `sanitize_url()` was undeprecated as a wrapper for
 `esc_url_raw()` as sanitizing functions are generally prefixed `sanitize_`
 but for sanitizing URLs it was prefixed `esc_`. It was confusing.

 As `sanitize_url()` is to become
 [https://make.wordpress.org/plugins/2022/05/25/rejoice-to-sanitize_url/
 the recommended function for sanitizing a URL], it ought to be the
 canonical function call and contain the code currently in `esc_url_raw()`.

 This will reduce the number of function calls required when using the
 recommended technique.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55852>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list