Make WordPress Core


Ignore:
Timestamp:
09/17/2014 03:13:24 PM (11 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/shortcodes.php

    r29207 r29748  
    232232
    233233    // WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
    234     // Also, see shortcode_unautop() and shortcode.js.
     234    // Also, see shortcode_unautop() and shortcode.js and wptexturize().
    235235    return
    236236          '\\['                              // Opening bracket
Note: See TracChangeset for help on using the changeset viewer.