[wp-trac] [WordPress Trac] #15600: shortcode_unautop returns emtpy string

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 16 03:59:34 UTC 2011


#15600: shortcode_unautop returns emtpy string
-------------------------------------------------+-------------------------
 Reporter:  mdbitz                               |       Owner:  westi
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  high                                 |   Milestone:  3.3
Component:  Formatting                           |     Version:  3.0.1
 Severity:  major                                |  Resolution:
 Keywords:  needs-testing has-patch needs-unit-  |
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by mdawaffe):

 Replying to [comment:35 mdawaffe]:
 > [attachment:15600.5.diff] has been running on WP.com since I uploaded
 the patch here with no (known to me) problems.

 We found a problem :)

 [attachment:15600.6.diff] is a more forgiving regex - it's more generous
 in what can match as the shortcode attributes.  It reproduces the behavior
 of the current code, in that regard: allow {{{shortcode_parse_atts()}}} to
 do the attribute parsing.

 It's very slightly slower than [attachment:15600.5.diff], but has better
 backtracing performance.  It's still much faster than the current code.

 {{{
 $ ./shortcodes-tests.sh ~/15600.6.diff
 Reverted 'wp-includes/formatting.php'
 Reverted 'wp-includes/shortcodes.php'
 shortcode_unautop() Tests: original
 SHORT TIME: 0.0095028877258301
 LONG  TIME: 3.7883765697479
 SHORT BACKTRACE REQUIREMENT: 232
 LONG  BACKTRACE REQUIREMENT: 135670

 do_shortcode() Tests: original
 SHORT TIME: 0.029194116592407
 LONG  TIME: 19.19673538208
 SHORT BACKTRACE REQUIREMENT: 420
 LONG  BACKTRACE REQUIREMENT: 135858

 patching file wp-includes/shortcodes.php
 patching file wp-includes/formatting.php
 shortcode_unautop() Tests: patched
 SHORT TIME: 0.0085659027099609
 LONG  TIME: 0.39086127281189
 SHORT BACKTRACE REQUIREMENT: 33
 LONG  BACKTRACE REQUIREMENT: 37

 do_shortcode() Tests: patched
 SHORT TIME: 0.026137113571167
 LONG  TIME: 0.41313719749451
 SHORT BACKTRACE REQUIREMENT: 42
 LONG  BACKTRACE REQUIREMENT: 46

 DIFFS:
 }}}

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


More information about the wp-trac mailing list