WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#34408 closed enhancement (fixed)

Promote WP_HTTP::parse_url() to a top-level wp_parse_url function

Reported by: dd32 Owned by: dd32
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: HTTP API Keywords:
Focuses: Cc:

Description

WP_HTTP::parse_url() exists due to parsing bugs in < PHP 5.4.7 around schemeless URL's and IPv6, because of it's usefulness with parsing URI's which are becoming more common, we should promote it to a top-level function.

This would be beneficial to #34202

Change History (2)

#1 @dd32
5 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 35369:

WP_HTTP: Promote the WP_HTTP::parse_url() method to a more generic wp_parse_url() function.

Fixes #34408

#2 @dd32
5 years ago

In 35370:

Use wp_parse_url() in esc_url() to avoid parsing bugs in < PHP 5.4.7.

Props johnbillion for unit tests
See #34408
Fixes #34202

Note: See TracTickets for help on using tickets.