Changeset 33594
- Timestamp:
- 08/07/2015 02:49:31 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/shortcodes.php
r33469 r33594 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 $element = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $element ); 365 } 366 362 367 // Looks like we found some crazy unfiltered HTML. Skipping it for sanity. 363 368 $element = strtr( $element, $trans ); -
trunk/tests/phpunit/tests/shortcode.php
r33359 r33594 436 436 ), 437 437 array( 438 '<[[gallery]]>', 439 '<[gallery]>', 440 ), 441 array( 442 '<div style="background:url([[gallery]])">', 443 '<div style="background:url([[gallery]])">', 444 ), 445 array( 438 446 '[gallery]<div>Hello</div>[/gallery]', 439 447 '', … … 472 480 '<div [[gallery]]>', // Shortcodes will never be stripped inside elements. 473 481 '<div [[gallery]]>', 482 ), 483 array( 484 '<[[gallery]]>', 485 '<[[gallery]]>', 474 486 ), 475 487 array(
Note: See TracChangeset
for help on using the changeset viewer.