From 331bcde9c23b59d355f6722d2cbf25e09f72705a Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 10 Nov 2012 07:23:55 +0000 Subject: [PATCH] Update the JS version of the shortcode regex to match [22382]. props SergeyBiryukov. fixes #17657. git-svn-id: https://develop.svn.wordpress.org/trunk@22522 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/shortcode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/js/shortcode.js b/wp-includes/js/shortcode.js index d503e08172..9bc74ed289 100644 --- a/wp-includes/js/shortcode.js +++ b/wp-includes/js/shortcode.js @@ -98,7 +98,7 @@ window.wp = window.wp || {}; // 6. The closing tag. // 7. An extra `]` to allow for escaping shortcodes with double `[[]]` regexp: _.memoize( function( tag ) { - return new RegExp( '\\[(\\[?)(' + tag + ')\\b([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)', 'g' ); + return new RegExp( '\\[(\\[?)(' + tag + ')(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)', 'g' ); }),