Ticket #29557: 29557-idea-1.2.diff
File 29557-idea-1.2.diff, 2.8 KB (added by , 10 years ago) |
---|
-
src/wp-includes/formatting.php
214 214 . '(?:-->)?'; // End of comment. If not found, match all input. 215 215 216 216 $shortcode_regex = 217 '\[' // Find start of shortcode.218 . '[\/\[]?' // Shortcodes may begin with [/ or [[219 . '[^\s\/\[\] ]' // No whitespace before name.220 . '[^\[\] ]*+' // Shortcodes do not contain other shortcodes. Possessive critical.221 . '\]' // Find end of shortcode.222 . '\]?'; // Shortcodes may end with ]]217 '\[' // Find start of shortcode. 218 . '[\/\[]?' // Shortcodes may begin with [/ or [[ 219 . '[^\s\/\[\]<>]' // No whitespace before name. 220 . '[^\[\]<>]*+' // Shortcodes do not contain other shortcodes. Possessive critical. 221 . '\]' // Find end of shortcode. 222 . '\]?'; // Shortcodes may end with ]] 223 223 224 224 $regex = 225 225 '/(' // Capture the entire match. -
tests/phpunit/tests/formatting/WPTexturize.php
1197 1197 ), 1198 1198 array( 1199 1199 '[is it wise to <a title="allow user content ] here? hmm"> maybe </a> ]', // HTML corruption is a known bug. See tickets #12690 and #29557. 1200 '[is it wise to <a title="allow user content ] here? hmm ”> maybe </a> ]',1200 '[is it wise to <a title="allow user content ] here? hmm"> maybe </a> ]', 1201 1201 ), 1202 1202 array( 1203 1203 '[caption - is it wise to <a title="allow user content ] here? hmm"> maybe </a> ]', 1204 '[caption - is it wise to <a title="allow user content ] here? hmm”> maybe </a> ]',1204 '[caption – is it wise to <a title="allow user content ] here? hmm"> maybe </a> ]', 1205 1205 ), 1206 1206 array( 1207 1207 '[ photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy </a> ]', … … 1241 1241 ), 1242 1242 array( 1243 1243 '[gallery <br ... /> ...]', // This tag is still valid. Shortcode 'attributes' are not considered in the initial parsing of shortcodes, and HTML is allowed. 1244 '[gallery <br ... /> ...]',1244 '[gallery <br ... /> …]', 1245 1245 ), 1246 1246 array( 1247 1247 '<br [gallery ...] ... />', … … 1281 1281 ), 1282 1282 array( 1283 1283 '[[gallery <br ... /> ...]]', // This gets parsed as an escaped shortcode with embedded HTML. Brains may explode. 1284 '[[gallery <br ... /> ...]]',1284 '[[gallery <br ... /> …]]', 1285 1285 ), 1286 1286 array( 1287 1287 '<br [[gallery ...]] ... />', … … 1779 1779 ), 1780 1780 array( 1781 1781 '[gal>ery ...]', 1782 '[gal>ery ...]',1782 '[gal>ery …]', 1783 1783 ), 1784 1784 array( 1785 1785 '[randomthing param="test"]',