WordPress.org

Make WordPress Core

Changeset 42001


Ignore:
Timestamp:
10/24/2017 09:31:16 PM (2 years ago)
Author:
westonruter
Message:

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

Amends [41779].
See #40854.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-text.php

    r41867 r42001  
    293293        }
    294294
    295         $text = preg_replace_callback( '#<[^>]*>#', array( $this, 'inject_video_max_width_style' ), $text );
     295        $text = preg_replace_callback( '#<(video|iframe|object|embed)\s[^>]*>#i', array( $this, 'inject_video_max_width_style' ), $text );
    296296
    297297        ?>
Note: See TracChangeset for help on using the changeset viewer.