Title: &quot;WordPress should correct invalidly nested XHTML automatically&quot;
Last modified: August 21, 2016

---

# "WordPress should correct invalidly nested XHTML automatically"

 *  [RyanWilliams](https://wordpress.org/support/users/ryanwilliams/)
 * (@ryanwilliams)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/wordpress-should-correct-invalidly-nested-xhtml-automatically/)
 * Hi guys,
 * In the settings area there’s a checkbox:
 * > WordPress should correct invalidly nested XHTML automatically.
 * For a start, WordPress (or at least its themes) aren’t based on XHTML any more.
   At the very least it should just say ‘HTML’.
 * But leading on from that, what is this feature doing nowadays? Is it correcting
   code adhering to the XHTML specification? This could obviously cause problems
   if it sees perfectly valid HTML(5) as erroneous and messes around with it.
 * My thinking is that this feature should perhaps be retired. It’s been known to
   cause plugin issues in the past when enabled, and does anyone — user or developer—
   know what it’s _really_ doing?
 * It’d be better if such filtering were handled under the hood (it probably is 
   anyway). Who _isn’t_ going to want their code to be valid? And I’m pretty sure
   that TinyMCE messes with code even if you have this feature disabled.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 6 months ago](https://wordpress.org/support/topic/wordpress-should-correct-invalidly-nested-xhtml-automatically/#post-4383014)
 * > It’d be better if such filtering were handled under the hood
 * I thought checking this setting means WordPress will automatically resolve poorly
   nested elements behind the scenes, although we can’t say if that’s better. People
   who are not accidentally nesting elements badly should be made aware of that.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/wordpress-should-correct-invalidly-nested-xhtml-automatically/#post-4383035)
 * I think that all WP will do is close open tags. It won’t re-structure mis-nested
   tags.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘"WordPress should correct invalidly nested XHTML automatically"’ is closed
to new replies.

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 2 replies
 * 3 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/wordpress-should-correct-invalidly-nested-xhtml-automatically/#post-4383035)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
