[wp-trac] Re: [WordPress Trac] #8553: preg_replace_callback in do_shortcode returns empty for large posts

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 17 06:51:04 GMT 2009


#8553: preg_replace_callback in do_shortcode returns empty for large posts
---------------------------+------------------------------------------------
 Reporter:  AaronCampbell  |        Type:  defect (bug)
   Status:  new            |    Priority:  high        
Milestone:  2.9            |   Component:  Shortcodes  
  Version:                 |    Severity:  normal      
 Keywords:  needs-patch    |  
---------------------------+------------------------------------------------

Comment(by Brusdeylins):

 Hi,

 Bug 9264 is NOT THE SOLUTION ! (of course, it is an other topic...)
 I tested it on my long article "Yahoo Finance API"
 http://www.brusdeylins.info/projects/yahoo-finance-api/
 (This article contains source codes with square brackets in it, you have
 to face this!)

 In the Attachment in 9264 you are still running over the first closing
 bracket of the first shortcode tag: (.*?)
 This don't make sence if your shortcode names should not contain any
 brackets... So replace the (.*?) like described above...

 About 9264:
 the (\/)? allows you to use shortcode tags like [NAME/] at the beginning.
 And with (?:(.+?)\[\/\2\])? the closing tag is optional. So you can use
 tags combinations like:

 {{{
 [x]...[/x]
 [x/]...[/x]
 [x]
 [x/]
 }}}

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


More information about the wp-trac mailing list