[wp-trac] [WordPress Trac] #52886: Update esc_url to allow for specifying an https:// as default protocol
WordPress Trac
noreply at wordpress.org
Fri Sep 12 22:03:41 UTC 2025
#52886: Update esc_url to allow for specifying an https:// as default protocol
-------------------------------------------------+-------------------------
Reporter: mkaz | Owner:
| SergeyBiryukov
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.9
Component: Formatting | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch needs-dev-note has-unit- | Focuses:
tests |
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):
* owner: (none) => SergeyBiryukov
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"60734" 60734]:
{{{
#!CommitTicketReference repository="" revision="60734"
Formatting: Allow specifying `https://` as the default protocol in
`esc_url()`.
`esc_url()` will now prepend `https://` to the URL if it does not already
contain a scheme and the first item in the `$protocols` array is
`'https'`.
Follow-up to [5088], [6015], [13299], [33851], [60672].
Props sabernhardt, mkaz, rachelbaker, audrasjb, costdev, aksl95,
johnbillion, pcarvalho, SergeyBiryukov.
Fixes #52886.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52886#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list