Ticket #33116: 33116.trunk.2.patch
File 33116.trunk.2.patch, 1.4 KB (added by , 10 years ago) |
---|
-
src/wp-includes/shortcodes.php
359 359 360 360 $attributes = wp_kses_attr_parse( $element ); 361 361 if ( false === $attributes ) { 362 // Some plugins are doing things like [name] <[email]>. 363 if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) { 364 _doing_it_wrong( 'do_shortcode', 'Shortcodes in unnamed elements are no longer supported. This feature will be removed in 4.4.', '4.3' ); 365 $element = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $element ); 366 } 367 362 368 // Looks like we found some crazy unfiltered HTML. Skipping it for sanity. 363 369 $element = strtr( $element, $trans ); 364 370 continue; -
tests/phpunit/tests/shortcode.php
435 435 '<div [gallery]>', 436 436 ), 437 437 array( 438 '<div style="background:url([[gallery]])">', 439 '<div style="background:url([[gallery]])">', 440 ), 441 array( 438 442 '[gallery]<div>Hello</div>[/gallery]', 439 443 '', 440 444 ), … … 473 477 '<div [[gallery]]>', 474 478 ), 475 479 array( 480 '<[[gallery]]>', 481 '<[[gallery]]>', 482 ), 483 array( 476 484 '[gallery]<div>Hello</div>[/gallery]', 477 485 '', 478 486 ),