WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/29/2015 08:06:56 PM (6 years ago)
Author:
azaozz
Message:

Fix do_shortcode('<[shortcode]') edge case.
Props miqrogroove. Fixes #33116 for 4.2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/src/wp-includes/shortcodes.php

    r33360 r33499  
    374374        $attributes = wp_kses_attr_parse( $element );
    375375        if ( false === $attributes ) {
     376            // Some plugins are doing things like [name] <[email]>.
     377            if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) {
     378                $element = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $element );
     379            }
     380
    376381            // Looks like we found some crazy unfiltered HTML.  Skipping it for sanity.
    377382            $element = strtr( $element, $trans );
Note: See TracChangeset for help on using the changeset viewer.