How can I assign raw AtomContent?

Oct 14, 2009 at 1:11 PM

I've been looking at Argotic and thinking of using it instead of hand-crafting RSS/ATOM in aspx pages. My system uses an HTML editor, so all the content stored is in HTML. It gets trimmed down to safe content on output, links are transformed to absolute URIs in feeds, etc. I tried constructing an AtomContent of text/html type for each entry, but Argotic will always html-encode what I am giving it.

How do I work around this? How can I assign raw content to AtomContent?

PS: I tried Load, but that sounds backwards, I'd have to have something that looks like an AtomContent already to load.

Oct 20, 2009 at 11:54 AM

I am not sure that i understand how you mean. Can you post some code?


Dec 6, 2009 at 11:19 PM
Edited Dec 6, 2009 at 11:32 PM

Sorry for the late reply. This doesn't work:

atomEntry.Content = new AtomContent("<p>text</p>");
atomEntry.ContentType = "text/html";

It encodes my text, but I want my raw HTML.

Update: I figured it out. I was confused by "encoding", the second parameter to AtomContent. I would imagine that was character encoding, but looking at the source you should do this: atomEntry.Content = new AtomContent(post.Body, "html");.