Extraneous <p> tags
-
Apologies if this has been mentioned before, but I found a bug with what seems to be WordPress’s “Correct invalidly nested XHTML automatically” feature. Specifically, I had this XHTML in a post:
<ul> <li>Some text <ul> <li>Deeper nested list item</li> </ul> A bit more text</li> </ul>
WordPress attempted to “correct” the item in question by adding a
<p>
in front of “A bit more text”, above, but omitted the closing tag for the paragraph. This, of course, made the W3C validator spew brimstone and hellfire at me — through no fault of my own!Applying the correct
<p>
opening and closing tags to the original post content solved the problem, in that WordPress didn’t try to correct that, as well. However, you can see how this would be a problem. If this were HTML, it would be perfectly all right to omit the</p>
tag, but this is XHTML. I’m honestly not convinced the<p>
tag itself was required, but since WP insisted on it, it could at least be nice and do it right, right?Thanks for your time. By the way, it would be nice if this form had a preview option.
- The topic ‘Extraneous <p> tags’ is closed to new replies.