3rd Party HTML
So here is an interesting question I came across while working on one of my sites… The site in question has an XHTML1.0 Strict doctype and I have been very careful to make sure all of the markup validates. Today I received an email with some HTML provided by a third-party content provider that was definitly not valid XHTML (in fact it wasnt really valid anything, but that's not the point) for me to insert into one of the pages. Now what am I supposed to do?
I could rework the markup so it is valid but the provider has said that if we modify the HTML then they will no longer support it if there are problems. In addition one of the pieces of code that is invalid looks like this:
The amphrisand (&) is invalid - so says the w3c - because it really should be a &. The third-party has checked and its software will not behave properly if I replace the & with an & so thats not a good option. This means I have no choice but to leave in the invalid code. OK so this isnt the biggest deal in the world, but when you're trying to follow standards there is nothing more irritating.