diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index fb2141da46..8b5f3f84e6 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -3584,8 +3584,8 @@ function normalize_whitespace( $str ) { /** * Properly strip all HTML tags including script and style - * - * This differs from strip_tags() because it removes the contents of + * + * This differs from strip_tags() because it removes the contents of * the ' ) * will return 'something'. wp_strip_all_tags will return '' * diff --git a/wp-includes/media.php b/wp-includes/media.php index b5f130d010..12cc86b964 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1233,6 +1233,14 @@ function wp_video_shortcode( $attr, $content = '' ) { $html .= sprintf( $source, $type['type'], esc_url( $$fallback ) ); } } + + if ( ! empty( $content ) ) { + if ( false !== strpos( $content, "\n" ) ) + $content = str_replace( array( "\r\n", "\n", "\t" ), '', $content ); + + $html .= trim( $content ); + } + if ( 'mediaelement' === $library ) $html .= wp_mediaelement_fallback( $fileurl ); $html .= '';