Changeset 33564
- Timestamp:
- 08/04/2015 07:16:32 AM (11 years ago)
- Location:
- branches/4.1
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
src/wp-includes/shortcodes.php (modified) (1 diff)
-
tests/phpunit/tests/shortcode.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1
- Property svn:mergeinfo changed
/branches/4.2 (added) merged: 33499
- Property svn:mergeinfo changed
-
branches/4.1/src/wp-includes/shortcodes.php
r33521 r33564 352 352 $attributes = wp_kses_attr_parse( $element ); 353 353 if ( false === $attributes ) { 354 // Some plugins are doing things like [name] <[email]>. 355 if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) { 356 $element = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $element ); 357 } 358 354 359 // Looks like we found some crazy unfiltered HTML. Skipping it for sanity. 355 360 $element = strtr( $element, $trans ); -
branches/4.1/tests/phpunit/tests/shortcode.php
r33380 r33564 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.