Skip to content

Commit

Permalink
Merge pull request #1 from barijaona/issue623-624
Browse files Browse the repository at this point in the history
Follow up on pull request #623
  • Loading branch information
lapcat committed Apr 15, 2016
2 parents 7fdd0b6 + 5a83b61 commit 371e55f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2496,6 +2496,10 @@ -(void)viewArticlePages:(id)sender inPreferredBrowser:(BOOL)usePreferredBrowser
}
}
[self openURLs:urls inPreferredBrowser:usePreferredBrowser];

if (([Preferences standardPreferences].markReadInterval > 0.0f) && !db.readOnly) {
[articleController markReadByArray:articlesWithLinks readFlag:YES];
}
}
}

Expand Down
13 changes: 8 additions & 5 deletions src/RichXMLParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,16 @@ -(BOOL)parseRichXML:(NSData *)xmlData
error:&error];
if (xmlDocument == nil && error != nil) {
if ([error.domain isEqualToString:NSXMLParserErrorDomain]) {
if (error.code == NSXMLParserGTRequiredError)
return NO;
if (error.code == NSXMLParserPrematureDocumentEndError)
// handle here cases identified to cause
// application crashes caused by
// NSXMLDocument's -initWithData:options:error
// when option NSXMLDocumentTidyXML is enabled
switch (error.code) {
case NSXMLParserGTRequiredError:
return NO;
}
}
// Do we even want to try this?
// We get assertion failures with the above 2 cases, so we'll probably get them with other cases too.
// recover some cases like text encoding errors, non standard tags...
xmlDocument = [[NSXMLDocument alloc] initWithData:xmlData
options: NSXMLDocumentTidyXML
error:&error];
Expand Down

0 comments on commit 371e55f

Please sign in to comment.