From 3908f2df862895dab4d6bf5b226558412f01ce56 Mon Sep 17 00:00:00 2001 From: "Mikhail Iumanov (tufsampla)" Date: Sat, 31 Aug 2024 04:52:33 +0400 Subject: fix authorfield handling in Rss09xParser::parse_item --- rss/rss09xparser.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'rss/rss09xparser.cpp') diff --git a/rss/rss09xparser.cpp b/rss/rss09xparser.cpp index 197e64b3..952bc3ac 100644 --- a/rss/rss09xparser.cpp +++ b/rss/rss09xparser.cpp @@ -106,8 +106,12 @@ Item Rss09xParser::parse_item(xmlNode* itemNode) start > 0 && authorfield[start] != '('; start--) { } - it.author = authorfield.substr( - start + 1, end - start); + if (start <= 0) { + it.author_email = authorfield; + it.author = authorfield; + } else { + it.author = authorfield.substr(start + 1, end - start); + } } else { it.author_email = authorfield; it.author = authorfield; -- cgit v1.2.3 From d7fba3fada1baf37c38b26f9d724c91b1fd67065 Mon Sep 17 00:00:00 2001 From: Mikhail Yumanov <31183195+mikhailyumanov@users.noreply.github.com> Date: Mon, 2 Sep 2024 01:14:19 +0400 Subject: Update rss/rss09xparser.cpp Co-authored-by: Alexander Batischev --- rss/rss09xparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rss/rss09xparser.cpp') diff --git a/rss/rss09xparser.cpp b/rss/rss09xparser.cpp index 952bc3ac..2de3209c 100644 --- a/rss/rss09xparser.cpp +++ b/rss/rss09xparser.cpp @@ -106,7 +106,7 @@ Item Rss09xParser::parse_item(xmlNode* itemNode) start > 0 && authorfield[start] != '('; start--) { } - if (start <= 0) { + if (start == 0) { it.author_email = authorfield; it.author = authorfield; } else { -- cgit v1.2.3