[wp-trac] [WordPress Trac] #20444: wpautop acts on a single line of text
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 14 23:08:15 UTC 2012
#20444: wpautop acts on a single line of text
--------------------------+------------------------------
Reporter: niallkennedy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by MarcusPope):
Another (w3c valid fragment) variation that will fail is:
asdfasdfasdf<br/>asdfasdfasdf<h1>Hello</h1>
which results in:
<p>asdfasdfasdf<br/>asdfasdfasdf<br />
<h1>Hello</h1>
It's missing the closing p tag after <br />. Changing the first
preg_replace|$allblocks line in formatting.php's wpautop function to
replace matches with "\n\n$1" (instead of "\n$1") will fix the above, but
creates problems for the test case attached to test-wpautop.php.
<div>
<p>hello</p>
<p><span>Wordpress</span></div>
Though I'm guessing this ticket will be closed invalid as #7937 was.
(sigh)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20444#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list