(fix) properly escape all GAL responses (fixes #3923)
parent
3c098ceca5
commit
fdea54f5e7
|
@ -2826,31 +2826,31 @@ void handle_eas_terminate(int signum)
|
||||||
[s appendString: @"<Properties>"];
|
[s appendString: @"<Properties>"];
|
||||||
|
|
||||||
if ((o = [contact objectForKey: @"displayname"]))
|
if ((o = [contact objectForKey: @"displayname"]))
|
||||||
[s appendFormat: @"<DisplayName xmlns=\"Gal:\">%@</DisplayName>", o];
|
[s appendFormat: @"<DisplayName xmlns=\"Gal:\">%@</DisplayName>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
if ((o = [contact objectForKey: @"title"]))
|
if ((o = [contact objectForKey: @"title"]))
|
||||||
[s appendFormat: @"<Title xmlns=\"Gal:\">%@</Title>", o];
|
[s appendFormat: @"<Title xmlns=\"Gal:\">%@</Title>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
if ((o = [contact objectForKey: @"givenname"]))
|
if ((o = [contact objectForKey: @"givenname"]))
|
||||||
[s appendFormat: @"<FirstName xmlns=\"Gal:\">%@</FirstName>", o];
|
[s appendFormat: @"<FirstName xmlns=\"Gal:\">%@</FirstName>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
if ((o = [contact objectForKey: @"sn"]))
|
if ((o = [contact objectForKey: @"sn"]))
|
||||||
[s appendFormat: @"<LastName xmlns=\"Gal:\">%@</LastName>", o];
|
[s appendFormat: @"<LastName xmlns=\"Gal:\">%@</LastName>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
if ([current_mail length] > 0)
|
if ([current_mail length] > 0)
|
||||||
[s appendFormat: @"<EmailAddress xmlns=\"Gal:\">%@</EmailAddress>", current_mail];
|
[s appendFormat: @"<EmailAddress xmlns=\"Gal:\">%@</EmailAddress>", current_mail];
|
||||||
|
|
||||||
if ((o = [contact objectForKey: @"telephonenumber"]))
|
if ((o = [contact objectForKey: @"telephonenumber"]))
|
||||||
[s appendFormat: @"<Phone xmlns=\"Gal:\">%@</Phone>", o];
|
[s appendFormat: @"<Phone xmlns=\"Gal:\">%@</Phone>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
if ((o = [contact objectForKey: @"homephone"]))
|
if ((o = [contact objectForKey: @"homephone"]))
|
||||||
[s appendFormat: @"<HomePhone xmlns=\"Gal:\">%@</HomePhone>", o];
|
[s appendFormat: @"<HomePhone xmlns=\"Gal:\">%@</HomePhone>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
if ((o = [contact objectForKey: @"mobile"]))
|
if ((o = [contact objectForKey: @"mobile"]))
|
||||||
[s appendFormat: @"<MobilePhone xmlns=\"Gal:\">%@</MobilePhone>", o];
|
[s appendFormat: @"<MobilePhone xmlns=\"Gal:\">%@</MobilePhone>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
if ((o = [contact objectForKey: @"o"]))
|
if ((o = [contact objectForKey: @"o"]))
|
||||||
[s appendFormat: @"<Company xmlns=\"Gal:\">%@</Company>", o];
|
[s appendFormat: @"<Company xmlns=\"Gal:\">%@</Company>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
[s appendString: @"</Properties>"];
|
[s appendString: @"</Properties>"];
|
||||||
[s appendString: @"</Result>"];
|
[s appendString: @"</Result>"];
|
||||||
|
|
Loading…
Reference in New Issue