Ticket #33116: 33116.branch.2.patch
File 33116.branch.2.patch, 1.4 KB (added by , 8 years ago) |
---|
-
src/wp-includes/shortcodes.php
373 373 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 ); 378 383 continue; -
tests/phpunit/tests/shortcode.php
417 417 '<div [gallery]>', 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 '', 422 430 ), … … 455 463 '<div [[gallery]]>', 456 464 ), 457 465 array( 466 '<[[gallery]]>', 467 '<[[gallery]]>', 468 ), 469 array( 458 470 '[gallery]<div>Hello</div>[/gallery]', 459 471 '', 460 472 ),