#include "VSSaxDriver.h"
#include "VSStringFormatter.h"
#include <SaxObjC/SaxException.h>
+#include <NGExtensions/NGQuotedPrintableCoding.h>
#include "common.h"
@interface VSSaxTag : NSObject
- (id)initWithContentString:(NSString *)_data;
- (NSString *)tagName;
+- (NSString *)group;
- (BOOL)isStartTag;
- (BOOL)isEndTag;
- (BOOL)isTag;
[self _endComponent:tagName value:tagValue];
}
else {
+ // TODO: make this more generic, this one is used with Outlook vCards
+ if ([tagAttributes containsObject:@"ENCODING=QUOTED-PRINTABLE"]) {
+ // TODO: QP is charset specific! The one below decodes in Unicode!
+ tagValue = [tagValue stringByDecodingQuotedPrintable];
+ [tagAttributes removeObject:@"ENCODING=QUOTED-PRINTABLE"];
+ }
+
[self _reportContentAsTag:[self _mapTagName:tagName]
group:[self _groupFromTagName:tagName]
- withAttrs:[self _mapAttrs:tagAttributes forTag:tagName]
+ withAttrs:[self _mapAttrs:tagAttributes forTag:tagName]
andContent:tagValue];
}