Changeset 27097
- Timestamp:
- 02/05/2014 01:42:02 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r27094 r27097 3585 3585 /** 3586 3586 * Properly strip all HTML tags including script and style 3587 * 3588 * This differs from strip_tags() because it removes the contents of 3587 * 3588 * This differs from strip_tags() because it removes the contents of 3589 3589 * the <script> and <style> tags. E.g. strip_tags( '<script>something</script>' ) 3590 3590 * will return 'something'. wp_strip_all_tags will return '' -
trunk/src/wp-includes/media.php
r27063 r27097 1234 1234 } 1235 1235 } 1236 1237 if ( ! empty( $content ) ) { 1238 if ( false !== strpos( $content, "\n" ) ) 1239 $content = str_replace( array( "\r\n", "\n", "\t" ), '', $content ); 1240 1241 $html .= trim( $content ); 1242 } 1243 1236 1244 if ( 'mediaelement' === $library ) 1237 1245 $html .= wp_mediaelement_fallback( $fileurl ); -
trunk/tests/phpunit/tests/media.php
r27096 r27097 369 369 * Test [video] shortcode processing 370 370 * 371 * @ticket 26864372 371 */ 373 372 function test_video_shortcode_body() { … … 394 393 395 394 $expected = '<div style="width: ' . $w . 'px; max-width: 100%;" class="wp-video">' . 396 "<!--[if lt IE 9]><script>document.createElement( \'video\');</script><![endif]-->\n" .395 "<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->\n" . 397 396 '<video class="wp-video-shortcode" id="video-0-1" width="' . $w . '" height="' . $h . '" preload="metadata" controls="controls">' . 398 397 '<source type="video/mp4" src="http://domain.tld/wp-content/uploads/2013/12/xyz.mp4" />' . 399 '< source type="video/webm" src="myvideo.webm" />' .400 '< source type="video/ogg" src="myvideo.ogv" />' .401 '< track kind="subtitles" src="subtitles.srt" srclang="en" />' .402 '< track kind="chapters" src="chapters.srt" srclang="en" />' .398 '<!-- WebM/VP8 for Firefox4, Opera, and Chrome --><source type="video/webm" src="myvideo.webm" />' . 399 '<!-- Ogg/Vorbis for older Firefox and Opera versions --><source type="video/ogg" src="myvideo.ogv" />' . 400 '<!-- Optional: Add subtitles for each language --><track kind="subtitles" src="subtitles.srt" srclang="en" />' . 401 '<!-- Optional: Add chapters --><track kind="chapters" src="chapters.srt" srclang="en" />' . 403 402 '<a href="http://domain.tld/wp-content/uploads/2013/12/xyz.mp4">' . 404 403 "http://domain.tld/wp-content/uploads/2013/12/xyz.mp4</a></video></div>\n";
Note: See TracChangeset
for help on using the changeset viewer.