Skip to content

Commit

Permalink
Fixed crash
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasgoutaland committed Sep 12, 2018
1 parent 9307e7c commit ac6b522
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/GONMarkupParserUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ + (void)cleanHTMLEntitiesFromString:(NSMutableString *)inputString
options:0
range:NSMakeRange(0, inputString.length)
usingBlock:^(NSTextCheckingResult * _Nullable result, NSMatchingFlags flags, BOOL * _Nonnull stop) {
[inputString replaceCharactersInRange:result.range withString:[dicEntities objectForKey:[inputString substringWithRange:result.range]]];
NSString *entity = [dicEntities objectForKey:[inputString substringWithRange:result.range]];
if (entity)
[inputString replaceCharactersInRange:result.range withString:entity];
}];
}

Expand Down

0 comments on commit ac6b522

Please sign in to comment.