From f8136f2ab22f5ac1ce7d6d65bb4d699e1c7a0b21 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 7 Aug 2015 02:50:25 +0000 Subject: [PATCH] Fix `do_shortcode('<[shortcode]')` edge case. Props miqrogroove. Merges [33499] trunk. See #33116. Built from https://develop.svn.wordpress.org/trunk@33594 git-svn-id: http://core.svn.wordpress.org/trunk@33561 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/shortcodes.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/shortcodes.php b/wp-includes/shortcodes.php index 4c9355f6b6..d16227ea3c 100644 --- a/wp-includes/shortcodes.php +++ b/wp-includes/shortcodes.php @@ -359,6 +359,11 @@ function do_shortcodes_in_html_tags( $content, $ignore_html ) { $attributes = wp_kses_attr_parse( $element ); if ( false === $attributes ) { + // Some plugins are doing things like [name] <[email]>. + if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) { + $element = preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $element ); + } + // Looks like we found some crazy unfiltered HTML. Skipping it for sanity. $element = strtr( $element, $trans ); continue; diff --git a/wp-includes/version.php b/wp-includes/version.php index 81ea3cbe03..e57aa7446d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-RC2-33593'; +$wp_version = '4.3-RC2-33594'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.