wpautop breaks block-level ins
According to the W3C recommendations, <ins> and <del> can be either block-level or inline elements. When they are block-level elements, they can include other block-level elements, such as
<p>blocks. Unfortunately, if you enter the following code in a WordPress post (version 1.5.2):
<p>Main post text.
<p>Oh, I forgot: additional paragraph one.
<p>Also: additional paragraph two.
WordPress adds an extra
</p>at the end, which of course stops the blog validating as correct XHTML. If you try putting each <ins> element on a new line, then WordPress still adds a superfluous
</p>, but now also sticks a
<br />between the two
<ins>elements, creating unwanted white space in the layout.
(Sorry for not formatting the code in this query as code, but it kept erasing elements, so I gave up.)
- The topic ‘wpautop breaks block-level ins’ is closed to new replies.