Fixes #542 #543 - issues with nesting CDATA tags

https://en.wikipedia.org/wiki/CDATA#Nesting is a better way to go about
this...