Fix for #2695
parent
96ece873ca
commit
33467093c1
|
@ -37,6 +37,28 @@ static NSArray *asElementArray = nil;
|
|||
|
||||
@implementation NGDOMElement (ActiveSync)
|
||||
|
||||
- (BOOL) isTextNode
|
||||
{
|
||||
id <DOMNodeList> children;
|
||||
id <DOMElement> element;
|
||||
int i;
|
||||
|
||||
if ([self nodeType] == DOM_TEXT_NODE)
|
||||
return YES;
|
||||
|
||||
children = [self childNodes];
|
||||
|
||||
for (i = 0; i < [children length]; i++)
|
||||
{
|
||||
element = [children objectAtIndex: i];
|
||||
|
||||
if ([element nodeType] != DOM_TEXT_NODE)
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
//
|
||||
// We must handle "inner data" like this:
|
||||
//
|
||||
|
@ -97,8 +119,12 @@ static NSArray *asElementArray = nil;
|
|||
tag = [element tagName];
|
||||
count = [(NSArray *)[element childNodes] count];
|
||||
|
||||
if ([element isTextNode])
|
||||
{
|
||||
value = [element textValue];
|
||||
}
|
||||
// Handle inner data - see above for samples
|
||||
if (count > 2)
|
||||
else
|
||||
{
|
||||
NSMutableArray *innerElements;
|
||||
id <DOMElement> innerElement;
|
||||
|
@ -144,12 +170,11 @@ static NSArray *asElementArray = nil;
|
|||
value = nil;
|
||||
}
|
||||
}
|
||||
else
|
||||
value = [[element firstChild] textValue];
|
||||
|
||||
if (value && tag)
|
||||
[data setObject: value forKey: tag];
|
||||
}
|
||||
|
||||
} // if ([element nodeType] == DOM_ELEMENT_NODE)
|
||||
}
|
||||
|
||||
return data;
|
||||
|
|
1
NEWS
1
NEWS
|
@ -15,6 +15,7 @@ Bug fixes
|
|||
- improved folder rename operations using ActiveSync (#2700)
|
||||
- fixed SmartReply/Forward when ReplaceMime was omitted (#2680)
|
||||
- fixed wrong generation of weekly repetitive events with ActiveSync (#2654)
|
||||
- fixed incorrect XML data conversion with ActiveSync (#2695)
|
||||
|
||||
2.2.3 (2014-04-03)
|
||||
------------------
|
||||
|
|
Loading…
Reference in New Issue