(fix) make sure we safely escape all chars

This commit is contained in:
Ludovic Marcotte authored and Francis Lachapelle committed 2017-01-06 20:58:08 -05:00
1 parent 3a96b3b315
commit 6649d7101e
3 files changed
+12 -13

No files matched your search

+3 -2
View File
@@ -688,8 +688,9 @@ static int cssEscapingCount;
- (NSString *) asSafeSQLString
{
return [[self stringByReplacingString: @"\\" withString: @"\\\\"]
stringByReplacingString: @"'" withString: @"\\'"];
return [[[self stringByReplacingString: @"\\" withString: @"\\\\"]
stringByReplacingString: @"'" withString: @"\\'"]
stringByReplacingString: @"\%" withString: @"\\%"];
}
- (NSUInteger) countOccurrencesOfString: (NSString *) substring