Fix `do_shortcode('<[shortcode]')` edge case.
Props miqrogroove. Fixes #33116 for 4.2. Built from https://develop.svn.wordpress.org/branches/4.2@33499 git-svn-id: http://core.svn.wordpress.org/branches/4.2@33466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c58e9ddf35
commit
ce7113bc3e
|
@ -373,6 +373,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;
|
||||
|
|
Loading…
Reference in New Issue