web/wp-includes/shortcodes.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
--- a/web/wp-includes/shortcodes.php	Wed Dec 19 12:35:13 2012 -0800
+++ b/web/wp-includes/shortcodes.php	Wed Dec 19 17:46:52 2012 -0800
@@ -177,11 +177,12 @@
 	$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
 		.     '(?:'