I'm trying to add CDATA to a SyndicationPerson object in C#.
SyndicationPerson author = new SyndicationPerson();
author.Name = string.Format("<!CDATA[{0}]]>", name);
author.Email = string.Format("<!CDATA[{0}]]>", email);
this.Authors.Add(author);
However, this serializes incorrectly because SyndicationPerson doesn't write to Xml as type "xhtml". Therefore, the output is:
<atom:author>
<atom:name><![CDATA[Bob Jones]]></atom:name>
<atom:email><![CDATA[[email protected]]]></atom:email>
</atom:author>
Is there a way around this? I've even tried
TextSyndicationContent authorName = TextSyndicationContent.CreateXhtmlContent(name);
to no avail. Thanks!