(fix) make sure we safely escape all chars

This commit is contained in:
Ludovic Marcotte
2017-01-06 20:58:08 -05:00
committed by Francis Lachapelle
parent 3a96b3b315
commit 6649d7101e
3 changed files with 12 additions and 13 deletions
+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