(fix) make sure we safely escape all chars

This commit is contained in:
Ludovic Marcotte committed 2016-12-09 10:47:44 -05:00
1 parent 8b2a6b05f1
commit c5a3f06538
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