From c35263939085f5f3bef0c6517afff335a55acf30 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 2 Jul 2021 14:16:46 +0300 Subject: Further canonical URIs --- src/feeds.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/feeds.c') diff --git a/src/feeds.c b/src/feeds.c index a68fd726..3bb6ad89 100644 --- a/src/feeds.c +++ b/src/feeds.c @@ -241,7 +241,7 @@ static void parseResult_FeedJob_(iFeedJob *d) { entry->bookmarkId = d->bookmarkId; iString *title = newRange_String(line); set_String(&entry->title, title); - set_String(&entry->url, canonicalUrl_String(&d->url)); + set_String(&entry->url, canonicalUrl_String(&d->url)); appendChar_String(&entry->url, '#'); append_String(&entry->url, collect_String(urlEncode_String(title))); delete_String(title); @@ -498,8 +498,9 @@ static void load_Feeds_(iFeeds *d) { break; } case 2: { - /* TODO: All right, this could maybe use a bit more robust, structured - format. The code below is messy. */ + /* TODO: Cleanup needed... + All right, this could maybe use a bit more robust, structured format. + The code below is messy. */ const uint32_t feedId = strtoul(line.start, NULL, 16); if (!nextSplit_Rangecc(range_Block(src), "\n", &line)) { goto aborted; @@ -535,6 +536,7 @@ static void load_Feeds_(iFeeds *d) { entry->discovered.ts.tv_sec = discovered; set_String(&entry->url, url); stripDefaultUrlPort_String(&entry->url); + set_String(&entry->url, canonicalUrl_String(&entry->url)); set_String(&entry->title, title); insert_SortedArray(&d->entries, &entry); } -- cgit v1.2.3