]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/shortcodes.php
Wordpress 3.5
[autoinstalls/wordpress.git] / wp-includes / shortcodes.php
index 1b860d2766df8cca052a2c816279be6cd20af7d3..2dfc2774502d1cabf5a436675b38ce645b34035e 100644 (file)
@@ -177,11 +177,12 @@ function get_shortcode_regex() {
        $tagregexp = join( '|', array_map('preg_quote', $tagnames) );
 
        // WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
+       // Also, see shortcode_unautop() and shortcode.js.
        return
                  '\\['                              // Opening bracket
                . '(\\[?)'                           // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
                . "($tagregexp)"                     // 2: Shortcode name
-               . '\\b'                              // Word boundary
+               . '(?![\\w-])'                       // Not followed by word character or hyphen
                . '('                                // 3: Unroll the loop: Inside the opening shortcode tag
                .     '[^\\]\\/]*'                   // Not a closing bracket or forward slash
                .     '(?:'