Make WordPress Core


Ignore:
Timestamp:
12/26/2015 04:47:58 AM (6 years ago)
Author:
dd32
Message:

Shortcodes: = is a reserved character in shortcode names, mark it as such.

This allows for shortcodes such as [shortcode=attribute] to work, which while never intentionally supported were widely used in the pre-shortcode days.

Merges [36097] to the 4.4 branch, minus a string change.
Props aaroncampbell.
Fixes #34939.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4/src/wp-includes/formatting.php

    r36037 r36098  
    217217    // Look for shortcodes and HTML elements.
    218218
    219     preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20]++)@', $text, $matches );
     219    preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20=]++)@', $text, $matches );
    220220    $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
    221221    $found_shortcodes = ! empty( $tagnames );
Note: See TracChangeset for help on using the changeset viewer.