Allow hyphens in shortcode names.

Props kovshenin, solarissmoke, aaroncampbell
fixes #17657


git-svn-id: https://develop.svn.wordpress.org/trunk@22382 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-11-05 22:27:36 +00:00
parent c65abf0993
commit 24a69e1602
2 changed files with 2 additions and 2 deletions

View File

@ -295,7 +295,7 @@ function shortcode_unautop( $pee ) {
. '(' // 1: The shortcode
. '\\[' // Opening bracket
. "($tagregexp)" // 2: Shortcode name
. '\\b' // Word boundary
. '(?![\\w-])' // Word boundary
// Unroll the loop: Inside the opening shortcode tag
. '[^\\]\\/]*' // Not a closing bracket or forward slash
. '(?:'

View File

@ -182,7 +182,7 @@ function get_shortcode_regex() {
'\\[' // Opening bracket
. '(\\[?)' // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
. "($tagregexp)" // 2: Shortcode name
. '\\b' // Word boundary
. '(?![\\w-])' // Word boundary
. '(' // 3: Unroll the loop: Inside the opening shortcode tag
. '[^\\]\\/]*' // Not a closing bracket or forward slash
. '(?:'