When doing a blog entry, if the entry ain't started with <p> Wordpress add's it, ;) great. But... if I start the message with a <blockquote> (for example) and after that adds <p> there is all of a sudden too many and my valid xhtml becomes invalid.
I havn't looked at the code, cause what I saw was a mess :D but i guess your using preg_match("<p>","...")
How about expading that, so it looks for more tags then just <p> ;)