FeedReader:

- Fixed crash when removing a feed displayed in the main tab.
- Fixed reading author of ATOM feeds.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6057 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-01-02 21:02:39 +00:00
parent c44d10a6a1
commit e099389528
3 changed files with 20 additions and 4 deletions

View file

@ -276,6 +276,7 @@ RsFeedReaderErrorState p3FeedReaderThread::download(const RsFeedReaderFeed &feed
std::string contentType = CURL.contentType();
if (isContentType(contentType, "text/xml") ||
isContentType(contentType, "text/html") ||
isContentType(contentType, "application/rss+xml") ||
isContentType(contentType, "application/xml") ||
isContentType(contentType, "application/xhtml+xml") ||
@ -900,7 +901,15 @@ RsFeedReaderErrorState p3FeedReaderThread::process(const RsFeedReaderFeed &feed,
item->link.erase(sidStart, sidEnd - sidStart);
}
xml.getChildText(node, "author", item->author);
if (feedFormat == FORMAT_ATOM) {
/* <author><name>... */
xmlNodePtr author = xml.findNode(node->children, "author", false);
if (author) {
xml.getChildText(node, "name", item->author);
}
} else {
xml.getChildText(node, "author", item->author);
}
switch (feedFormat) {
case FORMAT_RSS: