diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/embed.php --- a/wp/wp-includes/embed.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-includes/embed.php Fri Sep 05 18:40:08 2025 +0200 @@ -14,7 +14,7 @@ * * @since 2.9.0 * - * @global WP_Embed $wp_embed + * @global WP_Embed $wp_embed WordPress Embed object. * * @param string $id An internal ID/name for the handler. Needs to be unique. * @param string $regex The regex that will be used to see if this handler should be used for a URL. @@ -32,7 +32,7 @@ * * @since 2.9.0 * - * @global WP_Embed $wp_embed + * @global WP_Embed $wp_embed WordPress Embed object. * * @param string $id The handler ID that should be removed. * @param int $priority Optional. The priority of the handler to be removed. Default 10. @@ -73,7 +73,7 @@ $width = 500; } - $height = min( ceil( $width * 1.5 ), 1000 ); + $height = min( (int) ceil( $width * 1.5 ), 1000 ); /** * Filters the default array of embed dimensions. @@ -230,7 +230,7 @@ * * @since 4.0.0 * - * @global WP_Embed $wp_embed + * @global WP_Embed $wp_embed WordPress Embed object. * * @param array $matches The RegEx matches from the provided regex when calling * wp_embed_register_handler(). @@ -244,7 +244,7 @@ $embed = $wp_embed->autoembed( sprintf( 'https://youtube.com/watch?v=%s', urlencode( $matches[2] ) ) ); /** - * Filters the YoutTube embed output. + * Filters the YouTube embed output. * * @since 4.0.0 * @@ -336,10 +336,10 @@ $output = ''; if ( is_singular() ) { - $output .= '' . "\n"; + $output .= '' . "\n"; if ( class_exists( 'SimpleXMLElement' ) ) { - $output .= '' . "\n"; + $output .= '' . "\n"; } } @@ -426,7 +426,7 @@ * @param string $embed_url The post embed URL. * @param WP_Post $post The corresponding post object. */ - return esc_url_raw( apply_filters( 'post_embed_url', $embed_url, $post ) ); + return sanitize_url( apply_filters( 'post_embed_url', $embed_url, $post ) ); } /** @@ -510,11 +510,13 @@ esc_attr( $secret ) ); - // Note that the script must be placed after the
and