From 42809dad4337d5344bff61f25e079cd19647c810 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 6 Aug 2014 17:01:17 +0000 Subject: [PATCH] Use proper non-capturing regex syntax for YouTube in `wp_video_shortcode()`. Props Fab1en. See [27063]. Fixes #29119. Built from https://develop.svn.wordpress.org/trunk@29401 git-svn-id: http://core.svn.wordpress.org/trunk@29179 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index bf663b2335..ad219926c4 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1758,7 +1758,7 @@ function wp_video_shortcode( $attr, $content = '' ) { } } - $yt_pattern = '#^https?://(:?www\.)?(:?youtube\.com/watch|youtu\.be/)#'; + $yt_pattern = '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#'; $primary = false; if ( ! empty( $atts['src'] ) ) {