WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/04/2015 07:16:32 AM (6 years ago)
Author:
dd32
Message:

Fix do_shortcode('<[shortcode]') edge case.
Props miqrogroove.

Merges [33499] to the 4.1 branch.
See #33116.

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/src/wp-includes/shortcodes.php

    r33521 r33564  
    352352        $attributes = wp_kses_attr_parse( $element );
    353353        if ( false === $attributes ) {
     354            // Some plugins are doing things like [name] <[email]>.
     355            if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) {
     356                $element = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $element );
     357            }
     358
    354359            // Looks like we found some crazy unfiltered HTML.  Skipping it for sanity.
    355360            $element = strtr( $element, $trans );
Note: See TracChangeset for help on using the changeset viewer.