From 397efc640fe3e59e743f7be2d4a7c029312fa8e8 Mon Sep 17 00:00:00 2001 From: Jon Cave Date: Tue, 6 Nov 2012 14:47:33 +0000 Subject: [PATCH] Update shortcode regular expression commentary. See #17657. git-svn-id: https://develop.svn.wordpress.org/trunk@22401 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/formatting.php | 2 +- wp-includes/shortcodes.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 2ccb953e2f..dc66d89adf 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -295,7 +295,7 @@ function shortcode_unautop( $pee ) { . '(' // 1: The shortcode . '\\[' // Opening bracket . "($tagregexp)" // 2: Shortcode name - . '(?![\\w-])' // Word boundary + . '(?![\\w-])' // Not followed by word character or hyphen // Unroll the loop: Inside the opening shortcode tag . '[^\\]\\/]*' // Not a closing bracket or forward slash . '(?:' diff --git a/wp-includes/shortcodes.php b/wp-includes/shortcodes.php index 2ed9c8af75..2dfc277450 100644 --- a/wp-includes/shortcodes.php +++ b/wp-includes/shortcodes.php @@ -182,7 +182,7 @@ function get_shortcode_regex() { '\\[' // Opening bracket . '(\\[?)' // 1: Optional second opening bracket for escaping shortcodes: [[tag]] . "($tagregexp)" // 2: Shortcode name - . '(?![\\w-])' // 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 . '(?:'