[wp-trac] [WordPress Trac] #19855: Too much text in <pre> tag causes no output
WordPress Trac
wp-trac at lists.automattic.com
Mon Mar 5 18:46:35 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:9 azaozz]:
> Keep in mind that inside <pre> tags the htmlspecialchars are encoded
Thanks, I've updated the unit test appropriately. [http://unit-
test.trac.wordpress.org/changeset/562 562]
[[attachment:19855-2.patch]] still has a slight bug:
Input
{{{
Here's some cool code <pre>my cool code</pre> Wasn't that cool?
}}}
Output:
{{{
<p>Here's some cool code
<pre>my cool code</pre>
<p> Wasn't that cool?</p>
}}}
The top line is missing a closing `</p>` tag.
In [[attachment:19855-3.patch]] I added this:
{{{
$pee = str_ireplace( '<pre', "\n\n<pre", $pee );
}}}
to ensure that all `<pre>` tags have sufficient whitespace to be processed
normally.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19855#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list