WordPress.org

Make WordPress Core

Changeset 22522


Ignore:
Timestamp:
11/10/2012 07:23:55 AM (7 years ago)
Author:
nacin
Message:

Update the JS version of the shortcode regex to match [22382]. props SergeyBiryukov. fixes #17657.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/shortcode.js

    r22126 r22522  
    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
Note: See TracChangeset for help on using the changeset viewer.