Make WordPress Core

Ticket #29119: 29119.patch

File 29119.patch, 440 bytes (added by Fab1en, 10 years ago)

Correct regex formulation

  • wp-includes/media.php

    diff --git a/wp-includes/media.php b/wp-includes/media.php
    index bf663b2..ad21992 100644
    a b function wp_video_shortcode( $attr, $content = '' ) { 
    17581758                }
    17591759        }
    17601760
    1761         $yt_pattern = '#^https?://(:?www\.)?(:?youtube\.com/watch|youtu\.be/)#';
     1761        $yt_pattern = '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#';
    17621762
    17631763        $primary = false;
    17641764        if ( ! empty( $atts['src'] ) ) {