mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 01:24:27 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@36097 602fd350-edb4-49c9-b593-d223f7449a82
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