[wp-trac] [WordPress Trac] #19855: Too much text in <pre> tag causes no output

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 20 00:32:40 UTC 2012


#19855: Too much text in <pre> tag causes no output
--------------------------+------------------------------
 Reporter:  helenyhou     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Formatting    |     Version:  1.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Changes (by kurtpayne):

 * cc: kpayne@… (added)
 * keywords:   => has-patch


Comment:

 Replying to [comment:3 azaozz]:
 > Coding this wouldn't be hard: `preg_split('|</?pre[ >]|', $pee, -1,
 PREG_SPLIT_DELIM_CAPTURE)`, then go through the array and replace strings
 starting with `<pre` with incremental placeholder, keeping them for later
 in an `array('placeholder_#' => 'string', ...)`.

 I used preg_match instead of preg_split.  I didn't see a performance a
 significant performance difference either way.  Let me know if you see any
 problems with the patch.  The sample content did not work before the
 patch, and worked fine with the patch.

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


More information about the wp-trac mailing list