Robke

Weblog

Unclosed P-tags in WordPress

Op 6 maart 2007 om 23u58 in PHP.
Geen reacties »

Wordpress

I’m writing this in English because someone might actually find this useful! When converting my blog to WordPress (version 2.1) I forgot to tell the server to serve my HTML with content-type application/xhtml+xml. When I did, I saw WordPress had added some unclosed <p>‘s after every <div> and before every <img>. Normally I don’t like hacking the code of a CMS, but I don’t think this could be done in an other way.

In wp-includes/formatting.php I uncommented two ev1l regular expressions: one on line 64 and another on 74.