From f19f194c9038f88a3f4ac9ee73c1e2065a739862 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 1 Oct 2021 06:47:09 +0300 Subject: Fixed failure to parse Atom feed entry time Atom XML feed timestamps may have a T or a space as the separator between the date and the time. IssueID #348 --- res/about/version.gmi | 1 + src/mimehooks.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/res/about/version.gmi b/res/about/version.gmi index 32a545eb..5553c996 100644 --- a/res/about/version.gmi +++ b/res/about/version.gmi @@ -7,6 +7,7 @@ # Release notes ## 1.7.1 +* Fixed failure to parse Atom feed entry timestamps that use space as the date/time separator. * When adding a bookmark/folder, the bookmarks list scrolls to show the new item. * Improved reordering bookmarks in a folder: an item inside a folder can be moved to be the last item in the folder, or out of the folder depending on which side of the boundary marker the mouse cursor is. diff --git a/src/mimehooks.c b/src/mimehooks.c index ce712c2d..c097bd1f 100644 --- a/src/mimehooks.c +++ b/src/mimehooks.c @@ -142,7 +142,7 @@ static iBlock *translateAtomXmlToGeminiFeed_(const iString *mime, const iBlock * appendCStr_String(&out, cstr_Lang("feeds.atom.translated")); appendCStr_String(&out, "\n\n"); iRegExp *datePattern = - iClob(new_RegExp("^([0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9])T.*", caseSensitive_RegExpOption)); + iClob(new_RegExp("^([0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9])(T|\\s).*", caseSensitive_RegExpOption)); iBeginCollect(); iConstForEach(PtrArray, i, &feed->children) { iEndCollect(); -- cgit v1.2.3