[wp-trac] [WordPress Trac] #59247: Replace the remaining instances of esc_url_raw() with sanitize_url()

WordPress Trac noreply at wordpress.org
Wed Aug 30 20:23:32 UTC 2023


#59247: Replace the remaining instances of esc_url_raw() with sanitize_url()
--------------------------------------+----------------------
 Reporter:  SergeyBiryukov            |       Owner:  costdev
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  6.4
Component:  Formatting                |     Version:  6.1
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  good-first-bug has-patch  |     Focuses:
--------------------------------------+----------------------
Changes (by costdev):

 * owner:  (none) => costdev
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56494" 56494]:
 {{{
 #!CommitTicketReference repository="" revision="56494"
 General: Replace two `esc_url_raw()` calls in core with `sanitize_url()`.

 This aims to improve performance by calling `sanitize_url()` directly,
 instead of the `esc_url_raw()` wrapper. As of WordPress 6.1,
 `sanitize_url()` is the recommended function for sanitizing a URL for
 database or redirect usage.

 This replaces the two remaining instances of `esc_url_raw()` with
 `sanitize_url()` in WordPress core.

 Follow-up to [53455], [53933], [54522].

 Props rajinsharwar, SergeyBiryukov.
 Fixes #59247.
 }}}

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


More information about the wp-trac mailing list