diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-07-02 14:16:46 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-07-02 14:16:46 +0300 |
commit | c35263939085f5f3bef0c6517afff335a55acf30 (patch) | |
tree | a043517114581e980e397aced08d7db5008dc834 /src/feeds.c | |
parent | e85d491fa6ef340f19a5b757ae8d7c0b7c6a2677 (diff) |
Further canonical URIs
Diffstat (limited to 'src/feeds.c')
-rw-r--r-- | src/feeds.c | 8 |
1 files changed, 5 insertions, 3 deletions
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) { | |||
241 | entry->bookmarkId = d->bookmarkId; | 241 | entry->bookmarkId = d->bookmarkId; |
242 | iString *title = newRange_String(line); | 242 | iString *title = newRange_String(line); |
243 | set_String(&entry->title, title); | 243 | set_String(&entry->title, title); |
244 | set_String(&entry->url, canonicalUrl_String(&d->url)); | 244 | set_String(&entry->url, canonicalUrl_String(&d->url)); |
245 | appendChar_String(&entry->url, '#'); | 245 | appendChar_String(&entry->url, '#'); |
246 | append_String(&entry->url, collect_String(urlEncode_String(title))); | 246 | append_String(&entry->url, collect_String(urlEncode_String(title))); |
247 | delete_String(title); | 247 | delete_String(title); |
@@ -498,8 +498,9 @@ static void load_Feeds_(iFeeds *d) { | |||
498 | break; | 498 | break; |
499 | } | 499 | } |
500 | case 2: { | 500 | case 2: { |
501 | /* TODO: All right, this could maybe use a bit more robust, structured | 501 | /* TODO: Cleanup needed... |
502 | format. The code below is messy. */ | 502 | All right, this could maybe use a bit more robust, structured format. |
503 | The code below is messy. */ | ||
503 | const uint32_t feedId = strtoul(line.start, NULL, 16); | 504 | const uint32_t feedId = strtoul(line.start, NULL, 16); |
504 | if (!nextSplit_Rangecc(range_Block(src), "\n", &line)) { | 505 | if (!nextSplit_Rangecc(range_Block(src), "\n", &line)) { |
505 | goto aborted; | 506 | goto aborted; |
@@ -535,6 +536,7 @@ static void load_Feeds_(iFeeds *d) { | |||
535 | entry->discovered.ts.tv_sec = discovered; | 536 | entry->discovered.ts.tv_sec = discovered; |
536 | set_String(&entry->url, url); | 537 | set_String(&entry->url, url); |
537 | stripDefaultUrlPort_String(&entry->url); | 538 | stripDefaultUrlPort_String(&entry->url); |
539 | set_String(&entry->url, canonicalUrl_String(&entry->url)); | ||
538 | set_String(&entry->title, title); | 540 | set_String(&entry->title, title); |
539 | insert_SortedArray(&d->entries, &entry); | 541 | insert_SortedArray(&d->entries, &entry); |
540 | } | 542 | } |