Changeset 36098
- Timestamp:
- 12/26/2015 04:47:58 AM (9 years ago)
- Location:
- branches/4.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4/src/wp-includes/formatting.php
r36037 r36098 217 217 // Look for shortcodes and HTML elements. 218 218 219 preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20 ]++)@', $text, $matches );219 preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20=]++)@', $text, $matches ); 220 220 $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] ); 221 221 $found_shortcodes = ! empty( $tagnames ); -
branches/4.4/src/wp-includes/shortcodes.php
r35543 r36098 96 96 } 97 97 98 if ( 0 !== preg_match( '@[<>&/\[\]\x00-\x20 ]@', $tag ) ) {98 if ( 0 !== preg_match( '@[<>&/\[\]\x00-\x20=]@', $tag ) ) { 99 99 /* translators: %s: shortcode name */ 100 100 $message = sprintf( __( 'Invalid shortcode name: %s. Do not use spaces or reserved characters: & / < > [ ]' ), $tag ); … … 211 211 212 212 // Find all registered tag names in $content. 213 preg_match_all( '@\[([^<>&/\[\]\x00-\x20 ]++)@', $content, $matches );213 preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches ); 214 214 $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] ); 215 215 … … 579 579 580 580 // Find all registered tag names in $content. 581 preg_match_all( '@\[([^<>&/\[\]\x00-\x20 ]++)@', $content, $matches );581 preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches ); 582 582 $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] ); 583 583 -
branches/4.4/tests/phpunit/tests/shortcode.php
r35244 r36098 648 648 } 649 649 650 /** 651 * @ticket 34939 652 * 653 * Test the (not recommended) [shortcode=XXX] format 654 */ 655 function test_unnamed_attribute() { 656 $out = do_shortcode('[dumptag=https://wordpress.org/]'); 657 $expected = "0 = =https://wordpress.org\n"; 658 $this->assertEquals($expected, $out); 659 } 650 660 }
Note: See TracChangeset
for help on using the changeset viewer.