mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
The joys of wptexturize():
* Revert parts of [28773] and [28727] and [29748]. * Do not crash PHP. Make the shortcode quantifier possessive to avoid backtracks. * Reduce backtracking in long HTML comments by 100x. * Do not ignore unclosed HTML comments. * Do not break unregistered shortcodes, e.g. `[hello attr="value"]`. * Do not break HTML in shortcode attributes, e.g. `[hello attr="<"]`. * Do not match for shortcodes when there is extra whitespace, e.g. `[ hello ]`. * Add unit tests to show #12690 was not fully resolved. * Tested PHP 5.2.4, 5.2.13, 5.4.32, and 5.5.8. Adds/modifies unit tests. Props miqrogroove. See #29557. git-svn-id: https://develop.svn.wordpress.org/trunk@29781 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 and wptexturize().
|
||||
// Also, see shortcode_unautop() and shortcode.js.
|
||||
return
|
||||
'\\[' // Opening bracket
|
||||
. '(\\[?)' // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
|
||||
|
||||
Reference in New Issue
Block a user