I found a minor issue in wpautop()’s regular expressions which generated spooky HTML in rare circumstances.
The line 75 (WordPress 2.3.1) in functions.php,
'!<p>\s*(</?' . $allblocks . '[^>]*>)\s*</p>!'cannot tell <param> from <p>, which causes unexpcted results in <object> elements.
I’d suggest replacing it with
'!<p>\s*(</?' . $allblocks . '([\s/][^>]*)?>)\s*</p>!'or something like it.
- The topic ‘wpautop regex issue’ is closed to new replies.