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
This commit is contained in:
parent
ee4ce8688d
commit
42809dad43
|
@ -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'] ) ) {
|
||||
|
|
Loading…
Reference in New Issue