diff --git a/src/wp-includes/class-oembed.php b/src/wp-includes/class-oembed.php
index e5bc4a7627..34919fc08e 100644
--- a/src/wp-includes/class-oembed.php
+++ b/src/wp-includes/class-oembed.php
@@ -347,7 +347,7 @@ class WP_oEmbed {
}
}
- if ( $tagfound && preg_match_all( '/]+)>/i', $html, $links ) ) {
+ if ( $tagfound && preg_match_all( '#]+)/?>#iU', $html, $links ) ) {
foreach ( $links[1] as $link ) {
$atts = shortcode_parse_atts( $link );