mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Allow hyphens in shortcode names.
Props kovshenin, solarissmoke, aaroncampbell fixes #17657 git-svn-id: http://core.svn.wordpress.org/trunk@22382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bb1d497972
commit
3757d63f6b
@ -295,7 +295,7 @@ function shortcode_unautop( $pee ) {
|
|||||||
. '(' // 1: The shortcode
|
. '(' // 1: The shortcode
|
||||||
. '\\[' // Opening bracket
|
. '\\[' // Opening bracket
|
||||||
. "($tagregexp)" // 2: Shortcode name
|
. "($tagregexp)" // 2: Shortcode name
|
||||||
. '\\b' // Word boundary
|
. '(?![\\w-])' // Word boundary
|
||||||
// Unroll the loop: Inside the opening shortcode tag
|
// Unroll the loop: Inside the opening shortcode tag
|
||||||
. '[^\\]\\/]*' // Not a closing bracket or forward slash
|
. '[^\\]\\/]*' // Not a closing bracket or forward slash
|
||||||
. '(?:'
|
. '(?:'
|
||||||
|
@ -182,7 +182,7 @@ function get_shortcode_regex() {
|
|||||||
'\\[' // Opening bracket
|
'\\[' // Opening bracket
|
||||||
. '(\\[?)' // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
|
. '(\\[?)' // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
|
||||||
. "($tagregexp)" // 2: Shortcode name
|
. "($tagregexp)" // 2: Shortcode name
|
||||||
. '\\b' // Word boundary
|
. '(?![\\w-])' // Word boundary
|
||||||
. '(' // 3: Unroll the loop: Inside the opening shortcode tag
|
. '(' // 3: Unroll the loop: Inside the opening shortcode tag
|
||||||
. '[^\\]\\/]*' // Not a closing bracket or forward slash
|
. '[^\\]\\/]*' // Not a closing bracket or forward slash
|
||||||
. '(?:'
|
. '(?:'
|
||||||
|
Loading…
Reference in New Issue
Block a user