WordPress.org

Make WordPress Core

Changeset 22382


Ignore:
Timestamp:
11/05/2012 10:27:36 PM (6 years ago)
Author:
ryan
Message:

Allow hyphens in shortcode names.

Props kovshenin, solarissmoke, aaroncampbell
fixes #17657

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r22310 r22382  
    296296        .     '\\['                          // Opening bracket
    297297        .     "($tagregexp)"                 // 2: Shortcode name
    298         .     '\\b'                          // Word boundary
     298        .     '(?![\\w-])'                   // Word boundary
    299299                                             // Unroll the loop: Inside the opening shortcode tag
    300300        .     '[^\\]\\/]*'                   // Not a closing bracket or forward slash
  • trunk/wp-includes/shortcodes.php

    r22005 r22382  
    183183        . '(\\[?)'                           // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
    184184        . "($tagregexp)"                     // 2: Shortcode name
    185         . '\\b'                              // Word boundary
     185        . '(?![\\w-])'                       // Word boundary
    186186        . '('                                // 3: Unroll the loop: Inside the opening shortcode tag
    187187        .     '[^\\]\\/]*'                   // Not a closing bracket or forward slash
Note: See TracChangeset for help on using the changeset viewer.