Widgets: Limit container-constraining logic in Text widget to `video`, `iframe`, `object`, and `embed` elements.
Amends [41779]. See #40854. git-svn-id: https://develop.svn.wordpress.org/trunk@42001 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fb2e44456e
commit
5a02f2cd50
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue