Changeset 33499
- Timestamp:
- 07/29/2015 08:06:56 PM (9 years ago)
- Location:
- branches/4.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2/src/wp-includes/shortcodes.php
r33360 r33499 374 374 $attributes = wp_kses_attr_parse( $element ); 375 375 if ( false === $attributes ) { 376 // Some plugins are doing things like [name] <[email]>. 377 if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) { 378 $element = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $element ); 379 } 380 376 381 // Looks like we found some crazy unfiltered HTML. Skipping it for sanity. 377 382 $element = strtr( $element, $trans ); -
branches/4.2/tests/phpunit/tests/shortcode.php
r33360 r33499 418 418 ), 419 419 array( 420 '<[[gallery]]>', 421 '<[gallery]>', 422 ), 423 array( 424 '<div style="background:url([[gallery]])">', 425 '<div style="background:url([[gallery]])">', 426 ), 427 array( 420 428 '[gallery]<div>Hello</div>[/gallery]', 421 429 '', … … 454 462 '<div [[gallery]]>', // Shortcodes will never be stripped inside elements. 455 463 '<div [[gallery]]>', 464 ), 465 array( 466 '<[[gallery]]>', 467 '<[[gallery]]>', 456 468 ), 457 469 array(
Note: See TracChangeset
for help on using the changeset viewer.