diff --git a/src/wp-includes/class-wp-oembed-controller.php b/src/wp-includes/class-wp-oembed-controller.php index 74b400078d..290d60a66d 100644 --- a/src/wp-includes/class-wp-oembed-controller.php +++ b/src/wp-includes/class-wp-oembed-controller.php @@ -40,8 +40,10 @@ final class WP_oEmbed_Controller { 'callback' => array( $this, 'get_item' ), 'args' => array( 'url' => array( - 'required' => true, - 'sanitize_callback' => 'esc_url_raw', + 'description' => __( 'The URL of the resource for which to fetch oEmbed data.' ), + 'required' => true, + 'type' => 'string', + 'format' => 'uri', ), 'format' => array( 'default' => 'json', @@ -66,10 +68,10 @@ final class WP_oEmbed_Controller { 'permission_callback' => array( $this, 'get_proxy_item_permissions_check' ), 'args' => array( 'url' => array( - 'description' => __( 'The URL of the resource for which to fetch oEmbed data.' ), - 'type' => 'string', - 'required' => true, - 'sanitize_callback' => 'esc_url_raw', + 'description' => __( 'The URL of the resource for which to fetch oEmbed data.' ), + 'required' => true, + 'type' => 'string', + 'format' => 'uri', ), 'format' => array( 'description' => __( 'The oEmbed format to use.' ),