[wp-trac] [WordPress Trac] #10702: Support for complex nested shorttags

WordPress Trac noreply at wordpress.org
Wed Oct 29 16:27:50 UTC 2014


#10702: Support for complex nested shorttags
-----------------------------------------+-----------------------------
 Reporter:  pepijndevos                  |       Owner:
     Type:  enhancement                  |      Status:  new
 Priority:  normal                       |   Milestone:  Future Release
Component:  Shortcodes                   |     Version:  2.9
 Severity:  normal                       |  Resolution:
 Keywords:  needs-testing needs-refresh  |     Focuses:
-----------------------------------------+-----------------------------
Changes (by aaroncampbell):

 * keywords:  has-patch needs-testing => needs-testing needs-refresh


Comment:

 Looking at this, it seems that the thing making it more difficult is
 allowing the self-closing tags to be identical to an opening tag. It means
 that our simpler (certainly not simple) regex isn't pairing the right
 open/close tags. The current behavior is as follows:
 {{{
 [test num="1" expected="matches #6" actual="matches #3"]
   [test num="2" expected="matches #3" actual="seen as self-
 closing"]test1[/test num="3" expected="matches #2" actual="matches #1"]
   [test num="4" expected="matches #5" actual="matches #5"]test2[/test
 num="5" expected="matches #4" actual="matches #4"]
 [/test num="6" expected="matches #1" actual="ignored completely"]
 }}}

 After the patch, tags 1 & 6 from above were completely missed, but the
 internal pairs seemed to match correctly. Having said that, the patch is
 also 2 years old and I had to apply the changes manually.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/10702#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list