- Timestamp:
- 02/24/2022 05:16:50 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/trac/oembed/index.php
r11586 r11598 18 18 */ 19 19 include dirname( dirname( dirname( __DIR__ ) ) ) . '/wp-init.php'; 20 21 // Avoid warnings from DomDocument. 22 libxml_use_internal_errors( true ); 20 23 21 24 // Mark this as an oEmbed response for caching. … … 143 146 ]; 144 147 145 // Tags, with optional class specification to just strip out.148 // Tags, with optional SINGLE class specification to just strip out. 146 149 $remove_tags = [ 147 150 'form', … … 179 182 // Remove any tags 180 183 foreach ( $remove_tags as $tag ) { 181 list( $tag, $class ) = explode( '.', $tag, 2 ); 184 $class = false; 185 if ( str_contains( $tag, '.' ) ) { 186 list( $tag, $class ) = explode( '.', $tag ); 187 } 188 182 189 foreach ( $doc->getElementsByTagName( $tag ) as $el ) { 183 190 if ( $class && ! str_contains( $el->getAttribute( 'class' ), $class ) ) {
Note: See TracChangeset
for help on using the changeset viewer.