Added all bugfixes from current state of RSParser. Except HTML entities are still decoded for title, abstract and body.

This commit is contained in:
relikd
2019-01-12 23:28:48 +01:00
parent 2732573003
commit ca9452bc18
5 changed files with 27 additions and 26 deletions

View File

@@ -223,12 +223,8 @@ static NSString *kRelatedValue = @"related";
else if (EqualBytes(localName, "source", 6)) {
self.parsingSource = NO;
}
return;
case 8:
if (!self.parsingArticle && !self.parsingSource && self.parsedFeed.subtitle.length == 0) {
if (EqualBytes(localName, "subtitle", 8)) {
self.parsedFeed.subtitle = SAXParser.currentStringWithTrimmedWhitespace;
}
else if (isArticle && EqualBytes(localName, "issued", 6)) { // Atom 0.3 date
self.currentArticle.datePublished = [self dateFromCharacters:SAXParser.currentCharacters];;
}
return;
case 7:
@@ -244,6 +240,16 @@ static NSString *kRelatedValue = @"related";
}
}
return;
case 8:
if (!self.parsingArticle && !self.parsingSource && self.parsedFeed.subtitle.length == 0) {
if (EqualBytes(localName, "subtitle", 8)) {
self.parsedFeed.subtitle = SAXParser.currentStringWithTrimmedWhitespace;
}
}
else if (isArticle && EqualBytes(localName, "modified", 8)) { // Atom 0.3 date
self.currentArticle.dateModified = [self dateFromCharacters:SAXParser.currentCharacters];;
}
return;
case 9:
if (isArticle && EqualBytes(localName, "published", 9)) {
self.currentArticle.datePublished = [self dateFromCharacters:SAXParser.currentCharacters];