[wp-trac] [WordPress Trac] #17657: Shortcode regex doesn't allow for hyphens in shortcode name

WordPress Trac noreply at wordpress.org
Sat Nov 10 05:54:55 UTC 2012


#17657: Shortcode regex doesn't allow for hyphens in shortcode name
--------------------------+--------------------------
 Reporter:  sivel         |       Owner:  koopersmith
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  3.5
Component:  Shortcodes    |     Version:  2.9.2
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+--------------------------

Comment (by koopersmith):

 Replying to [comment:28 SergeyBiryukov]:
 > Replying to [comment:26 koopersmith]:
 > > We'll also need to update the regex in wp-includes/js/shortcode.js.
 >
 > [attachment:17657.5.diff] is an attempt to do that (not sure how to test
 it though).

 Looks solid. This is testable by running:

  `wp.shortcode.next('test', 'a [test-hyphen] shortcode');`

 If it returns an object it matched, if it returns undefined, it didn't.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17657#comment:29>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list