Search code examples
phphtmlhtmltidy

How do I avoid prevent the removal of tags in PHP Tidy?


I'm using Tidy to produce clean output, but it somehow removes my <nav> tags. Are there any configuration options that will avoid this?


Solution

  • The underlying tidy library doesn't know anything about HTML5.

    There is a new project underway to make a new tidy that handles HTML5: https://github.com/htacg/tidy-html5 That's not going to help you here, though.