[fix] CDATA for scripts and styles in XHTML documents. Fixes #906. Fixes #3993