diff --git a/wp-includes/embed-functions.php b/wp-includes/embed-functions.php index 514eac3ca8..d3c78dd829 100644 --- a/wp-includes/embed-functions.php +++ b/wp-includes/embed-functions.php @@ -423,7 +423,7 @@ function get_oembed_endpoint_url( $permalink = '', $format = 'json' ) { if ( '' !== $permalink ) { $url = add_query_arg( array( - 'url' => $permalink, + 'url' => urlencode( $permalink ), 'format' => $format, ), $url ); } @@ -851,4 +851,4 @@ function print_oembed_embed_scripts() { ?>