Today I noticed that YouTube videos embedded directly into WordPress were displaying an unexpected ) after the video. I mentioned it on the WordPress IRC; apparently it’s a YouTube bug… thanks Clorith.
Here’s a simple fix, which I wrote as a plugin called youtube_oembed_fix, but you could implement in your theme’s functions.php file.
add_filter( 'oembed_result', "ytoef_ytoef", 11, 3 );
function ytoef_ytoef( $html, $url, $args ) {
$html = rtrim( $html, ")");
return( $html );
}
The above is not implemented on this site. So I would have expected the unwanted ) to have appeared until YouTube implement the fix.
However, I have Jetpack installed, with the Shortcode Embeds module Activated. And Jetpack’s code is hiding the problem.
Hurrah or boo, depending on your point of view.