I haven’t read the whole thread, but reading about apparent parsing issues with CDATA, I use those in my ATOM feed template without any issue… it looks like this:
{{ printf `<title type="html"><![CDATA[%s]]></title>` .Title | safeHTML }}
...
{{ printf `<content type="html"><![CDATA[%s]]></content>` .Content | safeHTML }}