Make WordPress Core

Ticket #26674: 26674.patch

File 26674.patch, 1.4 KB (added by Kopepasah, 11 years ago)
Line 
1Index: wp-includes/functions.php
2===================================================================
3--- wp-includes/functions.php (revision 26746)
4+++ wp-includes/functions.php (working copy)
5@@ -4116,7 +4116,7 @@
6 function get_tag_regex( $tag ) {
7        if ( empty( $tag ) )
8                return;
9-       return sprintf( '<%1$s[^<]*(?:>[\s\S]*<\/%1$s>|\s*\/>)', tag_escape( $tag ) );
10+       return sprintf( '<%1$s[^<]*?(?:>[\s\S]*?<\/%1$s>|\s*\/>)', tag_escape( $tag ) );
11 }
12 
13 /**
14 
15
16
17Index: tests/phpunit/tests/media.php
18===================================================================
19--- tests/phpunit/tests/media.php       (revision 26862)
20+++ tests/phpunit/tests/media.php       (working copy)
21@@ -292,8 +292,11 @@
22        $embed =<<<EMBED
23<embed src="something.mp4"/>
24EMBED;
25+               $img =<<<IMG
26+<img src="kittens.jpg" alt="Cute Kittens"/>
27+IMG;
28        $iframe =<<<IFRAME
29-<iframe src="youtube.com" width="7000" />
30+<iframe src="youtube.com" width="7000"></iframe>
31IFRAME;
32        $audio =<<<AUDIO
33<audio preload="none">
34@@ -308,21 +311,45 @@
35
36        $content =<<<CONTENT
37This is a comment
38+$img
39+
40+This is a comment
41$object
42
43This is a comment
44+$iframe
45+
46+This is a comment
47$embed
48
49This is a comment
50+$video
51+
52+This is a comment
53+$img
54+
55+This is a comment
56$iframe
57
58This is a comment
59$audio
60
61This is a comment
62+$embed
63+
64+This is a comment
65+$iframe
66+
67+This is a comment
68$video
69
70This is a comment
71+$audio
72+
73+This is a comment
74+$object
75+
76+This is a comment
77CONTENT;
78
79        $types = array( 'audio', 'video', 'object', 'embed', 'iframe' );