Quantcast
Channel: Use Syndicationfeed to load XML with encoded links - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Charles Mager for Use Syndicationfeed to load XML with encoded links

$
0
0

The issue seems to be the creation of a Uri - you can reproduce with just this code:

var uri = new Uri("http://bl%C3%A5jus.se");

A possible solution is to pre-process the XML to decode the link urls before loading as a SyndicationFeed.

var doc = XDocument.Load(url);foreach (var link in doc.Descendants("link"){    link.Value = WebUtility.UrlDecode(link.Value);}using (var reader = doc.CreateReader()){    SyndicationFeed.Load(reader);}

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>