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

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 19 04:32:00 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     |
--------------------------+------------------------------

Comment (by kurtpayne):

 Replying to [comment:14 azaozz]:
 > there's no need to use regex at all.

 Playing devil's advocate here ... if an author is using the HTML editor
 and uses upper case tags, this patch won't work.

 Suggestions:

 1. Nothing.  If people are using upper case tags in the HTML editor, then
 it's user error
 2. Force pre tags to lower case before splitting.  This can be done
 without a regex, but it won't work work for mixed case
 {{{
 $pee = str_replace(array('<pre', '<PRE'), '<pre', $pee);
 $pee = str_replace(array('</pre>', '</PRE>'), '</pre>', $pee);
 }}}
 3. Revert to a regex split

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


More information about the wp-trac mailing list