Make WordPress Core

Ticket #51929: 51929.diff

File 51929.diff, 632 bytes (added by sabernhardt, 4 years ago)

wrapping unsupported video link with paragraph tag

  • src/wp-includes/media.php

     
    31903190                        $type = wp_check_filetype( $atts['src'], wp_get_mime_types() );
    31913191
    31923192                        if ( ! in_array( strtolower( $type['ext'] ), $default_types, true ) ) {
    3193                                 return sprintf( '<a class="wp-embedded-video" href="%s">%s</a>', esc_url( $atts['src'] ), esc_html( $atts['src'] ) );
     3193                                return sprintf( '<p><a class="wp-embedded-video" href="%s">%s</a></p>', esc_url( $atts['src'] ), esc_html( $atts['src'] ) );
    31943194                        }
    31953195                }
    31963196