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