From 040867492ea1796eb78b9cbc88141743e9f014e5 Mon Sep 17 00:00:00 2001 From: Chris Kaczor Date: Fri, 10 Nov 2017 07:32:30 -0500 Subject: [PATCH] Fix relative Atom paths (for GitHub at least, might break others?) --- Application/FeedParsers/AtomParser.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Application/FeedParsers/AtomParser.cs b/Application/FeedParsers/AtomParser.cs index 6171024..417e60a 100644 --- a/Application/FeedParsers/AtomParser.cs +++ b/Application/FeedParsers/AtomParser.cs @@ -1,4 +1,5 @@ -using Common.Debug; +using System; +using Common.Debug; using System.Xml; namespace FeedCenter.FeedParsers @@ -113,8 +114,9 @@ namespace FeedCenter.FeedParsers if (link.StartsWith("/")) { - link = Feed.Link + link; - link = link.Replace("//", "/"); + var uri = new Uri(Feed.Link); + + link = uri.Scheme + "://" + uri.Host + link; } feedItem.Link = link;