Ticket #33259: 33259.2.diff
File 33259.2.diff, 1.1 KB (added by , 10 years ago) |
---|
-
src/wp-includes/shortcodes.php
394 394 if ( $count > 0 ) { 395 395 // Sanitize the shortcode output using KSES. 396 396 $new_attr = wp_kses_one_attr( $new_attr, $elname ); 397 if ( '' !== $new_attr) {397 if ( '' !== trim( $new_attr ) ) { 398 398 // The shortcode is safe to use now. 399 399 $attr = $new_attr; 400 400 } -
tests/phpunit/tests/shortcode.php
419 419 '<!--[if lt IE 7]>', 420 420 ), 421 421 array( 422 '1 <a href="[test-shortcode-tag]"> 2 <a href="[test-shortcode-tag]" >', 423 '1 <a href=""> 2 <a href="" >', 424 ), 425 array( 426 '1 <a noise="[test-shortcode-tag]"> 2 <a noise=" [test-shortcode-tag] " >', 427 '1 <a noise="[test-shortcode-tag]"> 2 <a noise=" [test-shortcode-tag] " >', 428 ), 429 array( 422 430 '[gallery title="<div>hello</div>"]', 423 431 '', 424 432 ),