Make WordPress Core

Ticket #12690: 12690.3.diff

File 12690.3.diff, 1.1 KB (added by kovshenin, 9 years ago)
  • src/wp-includes/formatting.php

     
    219219                .               '[^\[\]<>]'     // Shortcodes do not contain other shortcodes.
    220220                .       '|'
    221221                .               '<[^>]+>'       // HTML elements permitted. Prevents matching ] before >.
    222                 .       ')+'
     222                .       ')++'
    223223                .       '\]'            // Find end of shortcode.
    224224                .       '\]?'           // Shortcodes may end with ]]
    225225                . ')/s';
     
    241241
    242242                        continue;
    243243
    244                 } elseif ( '[' === $first && 1 === preg_match( '/^\[(?:[^\[\]<>]|<[^>]+>)+\]$/', $curl ) ) {
     244                } elseif ( '[' === $first && 1 === preg_match( '/^\[(?:[^\[\]<>]|<[^>]+>)++\]$/', $curl ) ) {
    245245                        // This is a shortcode delimeter.
    246246
    247247                        _wptexturize_pushpop_element( $curl, $no_texturize_shortcodes_stack, $no_texturize_shortcodes );
    248248
    249                 } elseif ( '[' === $first && 1 === preg_match( '/^\[\[?(?:[^\[\]<>]|<[^>]+>)+\]\]?$/', $curl ) ) {
     249                } elseif ( '[' === $first && 1 === preg_match( '/^\[\[?(?:[^\[\]<>]|<[^>]+>)++\]\]?$/', $curl ) ) {
    250250                        // This is an escaped shortcode delimeter.
    251251
    252252                        // Do not texturize.