I am using ASP.Net's inbuilt classes to create XML feeds for a website. Here's the code I have,
SyndicationFeed myFeed = new SyndicationFeed();
myFeed.Title = TextSyndicationContent.CreatePlaintextContent
("XYZ - In the first line <br/> in the second line");
When rendered it shows as it is -
XYZ - In the first line <br/> in the second line
whereas I want it
XYZ - In the first line
in the second line
I see that the behavior is only to myFeed.Title, whereas in myFeed.Description, I can use any HTML tags.
Any way to get HTML tags working with Titles?
Use the SyndicationContent.CreateHtmlContent Method instead. SyndicationContent.CreatePlaintextContent always escapes the text to make it render literally.