mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-24 11:48:54 +00:00
Monotone-Parent: a1d5297ee60258830645ba6ddadf4cdd9b01b0fd
Monotone-Revision: 9526db8a187e1a3f30ac4b5933d589fcb9dbbc40 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-08-27T16:09:26 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
cfe59955d9
commit
d72fc4792b
3 files changed
+28
-22
No files matched your search
@@ -75,33 +75,33 @@
|
||||
[rendering appendString: [tag uppercaseString]];
|
||||
attributes = [anElement attributes];
|
||||
keys = [[attributes allKeys] objectEnumerator];
|
||||
key = [keys nextObject];
|
||||
while (key)
|
||||
while ((key = [keys nextObject]))
|
||||
{
|
||||
NSString *s;
|
||||
int i, c;
|
||||
|
||||
renderedAttrs = [[attributes objectForKey: key] renderedForCards];
|
||||
[rendering appendFormat: @";%@=", [key uppercaseString]];
|
||||
c = [renderedAttrs count];
|
||||
if (c > 0)
|
||||
{
|
||||
[rendering appendFormat: @";%@=", [key uppercaseString]];
|
||||
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
s = [renderedAttrs objectAtIndex: i];
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
s = [renderedAttrs objectAtIndex: i];
|
||||
|
||||
// We MUST quote attribute values that have a ":" in them and that
|
||||
// not already quoted
|
||||
if ([s length] > 2 && [s rangeOfString: @":"].length &&
|
||||
[s characterAtIndex: 0] != '"' && ![s hasSuffix: @"\""])
|
||||
s = [NSString stringWithFormat: @"\"%@\"", s];
|
||||
/* We MUST quote attribute values that have a ":" in them
|
||||
and that not already quoted */
|
||||
if ([s length] > 2 && [s rangeOfString: @":"].length &&
|
||||
[s characterAtIndex: 0] != '"' && ![s hasSuffix: @"\""])
|
||||
s = [NSString stringWithFormat: @"\"%@\"", s];
|
||||
|
||||
[rendering appendFormat: @"%@", s];
|
||||
[rendering appendFormat: @"%@", s];
|
||||
|
||||
if (i+1 < c)
|
||||
[rendering appendString: @","];
|
||||
}
|
||||
|
||||
key = [keys nextObject];
|
||||
if (i+1 < c)
|
||||
[rendering appendString: @","];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
values = [anElement values];
|
||||
|
||||
Reference in new issue
Block a user