Shortcodes: = is a reserved character in shortcode names, mark it as such.
This allows for shortcodes such as `[shortcode=attribute]` to work, which while never intentionally supported were widely used in the pre-shortcode days. Props aaroncampbell. Fixes #34939 for trunk. Built from https://develop.svn.wordpress.org/trunk@36097 git-svn-id: http://core.svn.wordpress.org/trunk@36062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -216,7 +216,7 @@ function wptexturize( $text, $reset = false ) {
|
||||
|
||||
// Look for shortcodes and HTML elements.
|
||||
|
||||
preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20]++)@', $text, $matches );
|
||||
preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20=]++)@', $text, $matches );
|
||||
$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
|
||||
$found_shortcodes = ! empty( $tagnames );
|
||||
$shortcode_regex = $found_shortcodes ? _get_wptexturize_shortcode_regex( $tagnames ) : '';
|
||||
|
||||
Reference in New Issue
Block a user