Fixing story author on newsletters

This commit is contained in:
Samuel Clay 2016-03-07 22:46:34 -08:00
parent 419e014b30
commit 1b4e5a8561
2 changed files with 5 additions and 3 deletions

View file

@ -1342,7 +1342,7 @@
}
if ([[story objectForKey:@"story_authors"] class] != [NSNull class]) {
cell.storyAuthor = [[story objectForKey:@"story_authors"] uppercaseString];
cell.storyAuthor = [[[story objectForKey:@"story_authors"] uppercaseString] stringByReplacingOccurrencesOfString:@"\"" withString:@""];
} else {
cell.storyAuthor = @"";
}

View file

@ -593,8 +593,10 @@
if ([[self.activeStory objectForKey:@"story_authors"] class] != [NSNull class] &&
[[self.activeStory objectForKey:@"story_authors"] length]) {
NSString *author = [NSString stringWithFormat:@"%@",
[self.activeStory objectForKey:@"story_authors"]];
if (author && [author class] != [NSNull class]) {
[[[[self.activeStory objectForKey:@"story_authors"] stringByReplacingOccurrencesOfString:@"\"" withString:@""]
stringByReplacingOccurrencesOfString:@"<" withString:@"&lt;"]
stringByReplacingOccurrencesOfString:@">" withString:@"&gt;"]];
if (author && author.length) {
int authorScore = [[[[appDelegate.storiesCollection.activeClassifiers objectForKey:feedId]
objectForKey:@"authors"]
objectForKey:author] intValue];