You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is what you are coming up against, but Apple's XML parser vomits when certain characters are fed to it. What we are doing to protect our app is strip them before sending the data into XMLDictionary/NSXMLParser.
NSMutableString *dataString = [[NSMutableString alloc] initWithData:data encoding:NSUTF8StringEncoding];
//This expression matches several control characters including all Information Separators
NSRegularExpression *expression = [NSRegularExpression regularExpressionWithPattern:@"&#x?[0-8,b,c,e,f];|[1-2,4-9];|[0-9,a-f];|[0-9];|[0,1];"
options:0
error:NULL];
[expression replaceMatchesInString:dataString
options:0
range:NSMakeRange(0, dataString.length)
withTemplate:@""];
NSData *filteredData = [dataString dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];
xmlDict = [newParser dictionaryWithData:filteredData];
My xml contains data as below.
When it tries to parse that data it great the queue return the data till that part.
The text was updated successfully, but these errors were encountered: