WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #12690, comment 31


Ignore:
Timestamp:
07/23/2014 02:10:09 PM (6 years ago)
Author:
kovshenin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12690, comment 31

    v1 v2  
    1212}}}
    1313
    14 A simple workaround would be to not backtrack to try and match an empty `[]` shortcode, see [attachment:12690.diff]. Here's a little [https://cloudup.com/c0FEcmIjupf perl script] if you'd like to compare the amount of backtracking on both variants.
     14A simple workaround would be to not backtrack to try and match an empty `[]` shortcode, see [attachment:12690.diff]. Here's a little [https://cloudup.com/cUmD0HTHMgO perl script] if you'd like to compare the amount of backtracking on both variants.
    1515
    1616That said, we should probably be looking into using the data in $shortcode_tags in that regex, or even get_shortcode_regex() entirely, that would limit the search to the actual shortcodes that are available, and it will probably break so many unit tests which rely on non-existent shortcodes such as `[code]` or `[...]`.