Changeset 34761 for trunk/src/wp-includes/shortcodes.php
- Timestamp:
- 10/02/2015 04:25:40 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/shortcodes.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/shortcodes.php
r34747 r34761 169 169 170 170 if ( shortcode_exists( $tag ) ) { 171 preg_match_all( '/' . get_shortcode_regex() . '/ s', $content, $matches, PREG_SET_ORDER );171 preg_match_all( '/' . get_shortcode_regex() . '/', $content, $matches, PREG_SET_ORDER ); 172 172 if ( empty( $matches ) ) 173 173 return false; … … 220 220 221 221 $pattern = get_shortcode_regex( $tagnames ); 222 $content = preg_replace_callback( "/$pattern/ s", 'do_shortcode_tag', $content );222 $content = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $content ); 223 223 224 224 // Always restore square braces so we don't break things like <!--[if IE ]> … … 379 379 // Some plugins are doing things like [name] <[email]>. 380 380 if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) { 381 $element = preg_replace_callback( "/$pattern/ s", 'do_shortcode_tag', $element );381 $element = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $element ); 382 382 } 383 383 … … 408 408 // was written by an administrator, so we should avoid changing the output 409 409 // and we do not need to run KSES here. 410 $attr = preg_replace_callback( "/$pattern/ s", 'do_shortcode_tag', $attr );410 $attr = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $attr ); 411 411 } else { 412 412 // $attr like 'name = "[shortcode]"' or "name = '[shortcode]'" 413 413 // We do not know if $content was unfiltered. Assume KSES ran before shortcodes. 414 414 $count = 0; 415 $new_attr = preg_replace_callback( "/$pattern/ s", 'do_shortcode_tag', $attr, -1, $count );415 $new_attr = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $attr, -1, $count ); 416 416 if ( $count > 0 ) { 417 417 // Sanitize the shortcode output using KSES. … … 573 573 574 574 $pattern = get_shortcode_regex( $tagnames ); 575 $content = preg_replace_callback( "/$pattern/ s", 'strip_shortcode_tag', $content );575 $content = preg_replace_callback( "/$pattern/", 'strip_shortcode_tag', $content ); 576 576 577 577 // Always restore square braces so we don't break things like <!--[if IE ]>
Note: See TracChangeset
for help on using the changeset viewer.