• 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

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    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.

    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.