Ticket #33116: 33116.patch
File 33116.patch, 1.4 KB (added by , 8 years ago) |
---|
-
src/wp-includes/shortcodes.php
378 378 379 379 $attributes = wp_kses_attr_parse( $element ); 380 380 if ( false === $attributes ) { 381 // Some plugins are doing weird things like [name] <[email]>. 382 if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) { 383 $element = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $element ); 384 } 385 381 386 // Looks like we found some crazy unfiltered HTML. Skipping it for sanity. 382 387 $element = strtr( $element, $trans ); 383 388 continue; -
tests/phpunit/tests/shortcode.php
435 435 '<div [gallery]>', 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 '', 440 448 ), … … 473 481 '<div [[gallery]]>', 474 482 ), 475 483 array( 484 '<[[gallery]]>', 485 '<[[gallery]]>', 486 ), 487 array( 476 488 '[gallery]<div>Hello</div>[/gallery]', 477 489 '', 478 490 ),