Missing close </p> tag in wpautop
|Reported by:||scenic||Owned by:|
|Component:||Template||Keywords:||wpautop xhtml has-patch|
wpautop seems to change <p><div></div></p> to <div><p></div>
(note the lack of a closing </p> in the second). This broke XHTML
compliance in some text appended by a custom plugin of mine, but I'm
guessing it would affect any div's I put in via the edit page.
I've attached the patch, but the short version of the fix is adding
this line below after line 66 in wp-includes/formatting.php.
$pee = preg_replace( '|(</div[>]*>\s*)</p>|', "</p>$1", $pee );
Change History (10)
comment:7 @JeremyVisser — 8 years ago
- Milestone changed from 2.1.1 to 2.2
- Resolution fixed deleted
- Status changed from closed to reopened