Yes, I attempt to sanitize content by running it through libtidy before importing it into DOMDocument. The class I'm doing that with, I don't have as a public project but it is working fairly well in...