WordPress.org

Ready to get started?Download WordPress

Forums

Automatic Dangling </p> tags (2 posts)

  1. wingnut
    Member
    Posted 10 years ago #

    I'm working on making a XHTML1.1 blog which by definition is strict. All of my blog entries have embedded xhtml tags which are balanced. When I have a long post that I close with any other tag then ; for instance a: </cite> or </table>, somewhere embedded in the logic a dangling paragraph closing tag gets added to the resulting output document. Since I check my postings to assure that the site remains valid with the w3c validator, It would be very helpful not to have this added help. In addition, I attempted to foil this behavior by trying use_balanceTags in both states to no effect.
    Other than that, I am very happy with .72; All the other blogging tools I reviewed where either too much goofing around (MovableType) or just wierd. Keep up the good work.
    Dr. Wingnut

  2. dilettanti
    Member
    Posted 10 years ago #

    The problem is a bad regex in the wpautop function. In /b2-include/b2functions.php, you need to modify line 13 to look more like line 12. About three-quarters through the 13th line of function wpautop, you should see a string something like:
    p|h[1-6])>)
    Just add a few characters to make it look like:
    p|h[1-6])[^>]*>)
    (Notice this sequence appears in the 12th line, right above it). That should fix the dangling tags issue in most places, unless you have block-level elements in list items or something similar.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.