Changeset 35577 for trunk/src/wp-includes/embed-functions.php
- Timestamp:
- 11/09/2015 12:07:03 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/embed-functions.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/embed-functions.php
r35485 r35577 461 461 $embed_url = get_post_embed_url( $post ); 462 462 463 $output = '<blockquote ><a href="' . get_permalink( $post) . '">' . get_the_title( $post ) . "</a></blockquote>\n";463 $output = '<blockquote class="wp-embedded-content"><a href="' . esc_url( get_permalink( $post ) ) . '">' . get_the_title( $post ) . "</a></blockquote>\n"; 464 464 465 465 $output .= "<script type='text/javascript'>\n"; … … 755 755 $allowed_html = array( 756 756 'a' => array( 757 'href'=> true,757 'href' => true, 758 758 ), 759 759 'blockquote' => array(), … … 767 767 'scrolling' => true, 768 768 'title' => true, 769 'class' => true,770 769 ), 771 770 ); … … 783 782 // We have a blockquote to fall back on. Hide the iframe by default. 784 783 $html = str_replace( '<iframe', '<iframe style="display:none;"', $html ); 785 } 786 787 $html = str_replace( '<iframe', '<iframe sandbox="allow-scripts" security="restricted"', $html ); 784 $html = str_replace( '<blockquote', '<blockquote class="wp-embedded-content"', $html ); 785 } 786 787 $html = str_replace( '<iframe', '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"', $html ); 788 788 789 789 preg_match( '/ src=[\'"]([^\'"]*)[\'"]/', $html, $results ); … … 957 957 */ 958 958 function _oembed_filter_feed_content( $content ) { 959 return str_replace( '<iframe sandbox="allow-scripts" security="restricted" style="display:none;"', '<iframesandbox="allow-scripts" security="restricted"', $content );960 } 959 return str_replace( '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="display:none;"', '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"', $content ); 960 }
Note: See TracChangeset
for help on using the changeset viewer.