[wp-trac] Re: [WordPress Trac] #7988: wpautop p (paragraph) bug
with div
WordPress Trac
wp-trac at lists.automattic.com
Tue Oct 28 21:44:19 GMT 2008
#7988: wpautop p (paragraph) bug with div
--------------------------------------------+-------------------------------
Reporter: filosofo | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.7
Component: General | Version: 2.7
Severity: normal | Resolution:
Keywords: wpautop p formatting has-patch |
--------------------------------------------+-------------------------------
Comment (by filosofo):
On second thought, that negative lookahead is overkill. There's no reason
any closing tag should be following a {{{<p>}}} and space---not just
address, div, and form.
{{{
$pee = preg_replace('#<p>\s*?(?!</)(\S.*)(</(?:address|div|form)[^>]*>)#',
"<p>$1</p>$2", $pee);
}}}
Should do the trick.
--
Ticket URL: <http://trac.wordpress.org/ticket/7988#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list