Note: this post is from 2007, outbound links may be broken.
WordPress 2.1 paragraph bug
So I updated rekkerd.org to WordPress 2.1 today. After making some small modifications to code here and there all seemed to work just fine… Until I opened the site in Firefox…
It turns out WordPress 2.1 has some changes in the formatting code (formerly functions-formatting.php, now formatting.php in wp-includes) which do some nasty things in certain situations.
In my case I have images in posts that I wrap in a div container, kinda like:
<div><img src=etc /></div>
Now with the new formatting functions of WP 2.1 it somehow adds a paragraphs tag in the output. And it doesn’t even close it either. On rekkerd.org it resulted in something like this:
<div><p><img src=etc /></div>
Internet Explorer eats it and shows the site like normal, but Firefox shrinks the image to mini size. And of course the page won’t validate either.
What’s up? The little image on the right side should look like this!
I found a few mentions of this problem on the WordPress forum already, so I’m sure it’ll get fixed, but for now I just pasted the code from the old functions-formatting.php in the new formatting.php file and all seems well.
Let me know if you still find a problem.