(fix) make sure we safely escape all chars

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