Widgets: Limit container-constraining logic in Text widget to video, iframe, object, and embed elements.

Amends [41779].
See #40854.

Built from https://develop.svn.wordpress.org/trunk@42001


git-svn-id: http://core.svn.wordpress.org/trunk@41835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-10-24 21:32:46 +00:00
parent bebb0b0d82
commit fd2e006968
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-beta3-42000';
$wp_version = '4.9-beta3-42001';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -292,7 +292,7 @@ class WP_Widget_Text extends WP_Widget {
echo $args['before_title'] . $title . $args['after_title'];
}
$text = preg_replace_callback( '#<[^>]*>#', array( $this, 'inject_video_max_width_style' ), $text );
$text = preg_replace_callback( '#<(video|iframe|object|embed)\s[^>]*>#i', array( $this, 'inject_video_max_width_style' ), $text );
?>
<div class="textwidget"><?php echo $text; ?></div>