WordPress.org

Make WordPress Core

Ticket #17657: 17657.5.diff

File 17657.5.diff, 730 bytes (added by SergeyBiryukov, 6 years ago)
  • wp-includes/js/shortcode.js

     
    9898                // 6. The closing tag.
    9999                // 7. An extra `]` to allow for escaping shortcodes with double `[[]]`
    100100                regexp: _.memoize( function( tag ) {
    101                         return new RegExp( '\\[(\\[?)(' + tag + ')\\b([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)', 'g' );
     101                        return new RegExp( '\\[(\\[?)(' + tag + ')(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)', 'g' );
    102102                }),
    103103
    104104