wpautop regex issue (1 post)

  1. rauru-block
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic