summaryrefslogtreecommitdiff
path: root/rss/rss09xparser.cpp
diff options
context:
space:
mode:
authorGravatar Alexander Batischev <eual.jp@gmail.com> 2024-09-19 21:24:16 +0300
committerGravatar GitHub <noreply@github.com> 2024-09-19 21:24:16 +0300
commitc74882f54eeca1d788c0eaf1d1adbf159ecaebdb (patch)
treef39fadb0ee4b73ce6d7b55b6610070300ef86343 /rss/rss09xparser.cpp
parentf137cee95088c8c586bff1d13c63889689597bc3 (diff)
parent5e7b1ec1cdab0e3732468283fecffd7ae4260b79 (diff)
downloadnewsboat-c74882f54eeca1d788c0eaf1d1adbf159ecaebdb.tar.gz
newsboat-c74882f54eeca1d788c0eaf1d1adbf159ecaebdb.tar.zst
newsboat-c74882f54eeca1d788c0eaf1d1adbf159ecaebdb.zip
Merge pull request #2834 from mikhailyumanov/master
Handling author name ending with ')'
Diffstat (limited to 'rss/rss09xparser.cpp')
-rw-r--r--rss/rss09xparser.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/rss/rss09xparser.cpp b/rss/rss09xparser.cpp
index 197e64b3..2de3209c 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;