I am making use of PHP tidy and I’ve been given a situation where a user has placed a comment within a href attribute, like so:
<a href="<!-- Comment -->">Link</a>
When I pass it through Tidy, it returns:
<a href="<!-- Comment -->">Link</a>
I am guessing this is Tidy’s way of correcting this? It makes sense, but is there a way to stop this behaviour, other than not using Tidy?!
I have tried switching on/off the configuration options: literal-attributes, fix-bad-comments and preserve-entities. But these do not seem to turn off this effect
I don’t think this is valid HTML even. You can’t put tags inside attribute values.