[wp-trac] [WordPress Trac] #12690: Square brackets breaking links that contain square brackets

WordPress Trac noreply at wordpress.org
Sat Jun 7 16:13:03 UTC 2014


#12690: Square brackets breaking links that contain square brackets
-----------------------------------+-----------------------------
 Reporter:  iandstewart            |       Owner:
     Type:  defect (bug)           |      Status:  reviewing
 Priority:  normal                 |   Milestone:  Future Release
Component:  Formatting             |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  wptexturize has-patch  |     Focuses:
-----------------------------------+-----------------------------

Comment (by miqrogroove):

 Yes, there is an unfortunate bug in shortcodes.php.  If we want to write
 something like this ...

 {{{The proper way to end the caption is with the [[/caption]] tag.}}}

 ... the "escaped" tag is ignored by the shortcode engine and the output is
 not unescaped as expected.  As a result, the input is required to be
 unescaped by the user ...

 {{{The proper way to end the caption is with the [/caption] tag.}}}

 ... to get the correct output, whereas the syntax changes again with tag
 pairs ...

 {{{The caption code is [[caption] like this [/caption]].}}}

 I think I can accommodate this by adjusting the unit tests and tweaking
 one or two conditions.  The regexp should still work because it is not
 checking the symmetry of extra braces.

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


More information about the wp-trac mailing list