Revert "Merge pull request #164 from Zentyal/jgarcia/revert-merge-inverse"

This reverts commit 1404dbdb88, reversing
changes made to 72cbd9a45f.
This commit is contained in:
Julio García committed 2015-08-03 09:48:06 +02:00
1 parent 0ce04fd4b6
commit 26bd1b30fa
41 files changed
+774 -291

No files matched your search

+17 -6
View File
@@ -1,6 +1,6 @@
/* NSString+Utilities.m - this file is part of SOGo
*
* Copyright (C) 2006-2014 Inverse inc.
* Copyright (C) 2006-2015 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -257,7 +257,7 @@ static int cssEscapingCount;
return selfCopy;
}
- (NSString *) doubleQuotedString
- (NSString *) asSafeJSString
{
NSMutableString *representation;
@@ -270,7 +270,12 @@ static int cssEscapingCount;
[representation replaceString: @"\r" withString: @"\\r"];
[representation replaceString: @"\t" withString: @"\\t"];
return [NSString stringWithFormat: @"\"%@\"", representation];
return representation;
}
- (NSString *) doubleQuotedString
{
return [NSString stringWithFormat: @"\"%@\"", [self asSafeJSString]];
}
//
@@ -333,12 +338,18 @@ static int cssEscapingCount;
int count;
strings = [NSArray arrayWithObjects: @"_U_", @"_D_", @"_H_", @"_A_", @"_S_",
@"_C_", @"_CO_", @"_SP_", @"_SQ_", @"_AM_", @"_P_", @"_DS_", nil];
@"_C_", @"_SC_",
@"_CO_", @"_SP_", @"_SQ_", @"_DQ_",
@"_LP_", @"_RP_", @"_LS_", @"_RS_", @"_LC_", @"_RC_",
@"_AM_", @"_P_", @"_DS_", nil];
[strings retain];
cssEscapingStrings = [strings asPointersOfObjects];
characters = [NSArray arrayWithObjects: @"_", @".", @"#", @"@", @"*", @":",
@",", @" ", @"'", @"&", @"+", @"$", nil];
characters = [NSArray arrayWithObjects: @"_", @".", @"#", @"@", @"*",
@":", @";",
@",", @" ", @"'", @"\"",
@"(", @")", @"[", @"]", @"{", @"}",
@"&", @"+", @"$", nil];
cssEscapingCount = [strings count];
cssEscapingCharacters = NSZoneMalloc (NULL,
(cssEscapingCount + 1)