(fix) make sure we safely escape all chars

This commit is contained in:
Ludovic Marcotte
2016-12-09 10:45:44 -05:00
parent b0fcaeef86
commit 340ddf0ae6
3 changed files with 12 additions and 13 deletions
+3 -2
View File
@@ -684,8 +684,9 @@ static int cssEscapingCount;
- (NSString *) asSafeSQLString
{
return [[self stringByReplacingString: @"\\" withString: @"\\\\"]
stringByReplacingString: @"'" withString: @"\\'"];
return [[[self stringByReplacingString: @"\\" withString: @"\\\\"]
stringByReplacingString: @"'" withString: @"\\'"]
stringByReplacingString: @"\%" withString: @"\\%"];
}
- (NSUInteger) countOccurrencesOfString: (NSString *) substring