mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-01 21:21:24 +01:00
When a video shortcode has content in its body, append it as inner HTML in the resulting <video>
.
Reverts [27096]. Fixes #26628. See #27016. Built from https://develop.svn.wordpress.org/trunk@27097 git-svn-id: http://core.svn.wordpress.org/trunk@26968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5e08452f49
commit
228fc639b9
@ -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 <script> and <style> tags. E.g. strip_tags( '<script>something</script>' )
|
||||
* will return 'something'. wp_strip_all_tags will return ''
|
||||
*
|
||||
|
@ -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 .= '</video>';
|
||||
|
Loading…
Reference in New Issue
Block a user