Make WordPress Core


Ignore:
Timestamp:
12/26/2015 04:45:26 AM (9 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.

Props aaroncampbell.
Fixes #34939 for trunk.

File:
1 edited

Legend:

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

    r36036 r36097  
    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.