diff --git a/Vienna/Sources/Info panel/InfoPanelController.m b/Vienna/Sources/Info panel/InfoPanelController.m index 8559ba4055..b0808141ce 100644 --- a/Vienna/Sources/Info panel/InfoPanelController.m +++ b/Vienna/Sources/Info panel/InfoPanelController.m @@ -194,14 +194,15 @@ - (IBAction)validateURL:(id)sender { NSURLComponents *urlComponents = [NSURLComponents componentsWithString:validatorURL]; NSString *validatedURL = self.urlField.stringValue.vna_trimmed; + // Override the text field's URL with the validated one. + self.urlField.stringValue = validatedURL; + NSCharacterSet *urlQuerySet = NSCharacterSet.URLQueryAllowedCharacterSet; NSString *encodedURL = [validatedURL stringByAddingPercentEncodingWithAllowedCharacters:urlQuerySet]; - - // Override the text field's URL with the encoded one. - self.urlField.stringValue = encodedURL; - + // prevent any confusion between feed's URL query string and validator's URL query string + encodedURL = [encodedURL stringByReplacingOccurrencesOfString:@"&" withString:@"%26"]; // Create the query using the encoded URL. - urlComponents.query = [NSString stringWithFormat:@"url=%@", encodedURL]; + urlComponents.percentEncodedQuery = [NSString stringWithFormat:@"url=%@", encodedURL]; if (self.delegate) { [self.delegate infoPanelControllerWillOpenURL:urlComponents.URL]; diff --git a/Vienna/Sources/Main window/ArticleListView.m b/Vienna/Sources/Main window/ArticleListView.m index fdc5abbc5f..7dcad5928c 100644 --- a/Vienna/Sources/Main window/ArticleListView.m +++ b/Vienna/Sources/Main window/ArticleListView.m @@ -938,7 +938,7 @@ -(void)scrollDownDetailsOrNextUnread [(NSView *)articleText scrollPageDown:nil]; } else { ArticleController * articleController = self.controller.articleController; - [articleController markReadByArray:articleController.markedArticleRange readFlag:YES]; + [articleController markReadByArray:self.markedArticleRange readFlag:YES]; [articleController displayNextUnread]; } } diff --git a/Vienna/Sources/Parsing/AtomFeed.m b/Vienna/Sources/Parsing/AtomFeed.m index c350bdcb29..046ef6188e 100644 --- a/Vienna/Sources/Parsing/AtomFeed.m +++ b/Vienna/Sources/Parsing/AtomFeed.m @@ -253,7 +253,7 @@ - (BOOL)initAtomFeed:(NSXMLElement *)atomElement } // Parse item date - if (isArticleElementAtomType && ([articleItemTag isEqualToString:@"modified"] || [articleItemTag isEqualToString:@"updated"])) { + if (isArticleElementAtomType && ([articleItemTag isEqualToString:@"updated"] || [articleItemTag isEqualToString:@"modified"])) { NSString *dateString = itemChildElement.stringValue; NSDate *newDate = [self dateWithXMLString:dateString]; if (newFeedItem.modificationDate == nil || [newDate isGreaterThan:newFeedItem.modificationDate]) { @@ -263,7 +263,7 @@ - (BOOL)initAtomFeed:(NSXMLElement *)atomElement } // Parse item date - if (isArticleElementAtomType && ([articleItemTag isEqualToString:@"created"] || [articleItemTag isEqualToString:@"published"])) { + if (isArticleElementAtomType && ([articleItemTag isEqualToString:@"published"] || [articleItemTag isEqualToString:@"created"] || [articleItemTag isEqualToString:@"issued"])) { NSString *dateString = itemChildElement.stringValue; NSDate *newDate = [self dateWithXMLString:dateString]; if (newFeedItem.publicationDate == nil || [newDate isLessThan:newFeedItem.publicationDate]) {