mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
wptexturize() improvements:
* Expand the `wptexturize()` RegEx to include the list of registered shortcodes. * Avoid backtracking after `[` chars by not filtering params in registered shortcodes. This will cause escaped shortcodes and their params to become texturized if not registered. * Registered shortcode params will never be texturized, even when escaped. * Move all tests involving unregistered shortcodes to a new and improved unit. * Update one test involving HTML within shortcode params. Props miqrogroove. See #29557. git-svn-id: https://develop.svn.wordpress.org/trunk@29748 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -231,7 +231,7 @@ function get_shortcode_regex() {
|
||||
$tagregexp = join( '|', array_map('preg_quote', $tagnames) );
|
||||
|
||||
// WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
|
||||
// Also, see shortcode_unautop() and shortcode.js.
|
||||
// Also, see shortcode_unautop() and shortcode.js and wptexturize().
|
||||
return
|
||||
'\\[' // Opening bracket
|
||||
. '(\\[?)' // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
|
||||
|
||||
Reference in New Issue
Block a user