Improve the escaping of script and style tags with CDATA blocks. CDATA is now only added when necessary, ugly remnants are avoided when CDATA is already present, and best of all our HTML handling code is significantly simplified.