~canonical-sysadmins/wordpress/5.1

« back to all changes in this revision

Viewing changes to wp-includes/shortcodes.php

  • Committer: Barry Price
  • Date: 2016-01-07 06:09:02 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: barry.price@canonical.com-20160107060902-ck851ica42q3m8k6
new upstream release 4.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
                return;
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 );
101
101
                _doing_it_wrong( __FUNCTION__, $message, '4.4.0' );
210
210
                return $content;
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
 
216
216
        if ( empty( $tagnames ) ) {
578
578
                return $content;
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
 
584
584
        if ( empty( $tagnames ) ) {