WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/07/2015 02:49:31 AM (6 years ago)
Author:
dd32
Message:

Fix do_shortcode('<[shortcode]') edge case.
Props miqrogroove.
Merges [33499] trunk.
See #33116.

File:
1 edited

Legend:

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

    r33469 r33594  
    360360        $attributes = wp_kses_attr_parse( $element );
    361361        if ( false === $attributes ) {
     362            // Some plugins are doing things like [name] <[email]>.
     363            if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) {
     364                $element = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $element );
     365            }
     366
    362367            // Looks like we found some crazy unfiltered HTML.  Skipping it for sanity.
    363368            $element = strtr( $element, $trans );
Note: See TracChangeset for help on using the changeset viewer.