2007-02-15 22:04:31 +01:00
|
|
|
/* UIxMailPartHTMLViewer.m - this file is part of SOGo
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 Inverse groupe conseil
|
|
|
|
*
|
|
|
|
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
|
|
*
|
|
|
|
* This file is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This file is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-02-15 22:04:31 +01:00
|
|
|
#import <Foundation/NSArray.h>
|
2007-04-04 16:12:18 +02:00
|
|
|
#import <Foundation/NSDictionary.h>
|
2007-02-15 22:04:31 +01:00
|
|
|
#import <SaxObjC/SaxAttributes.h>
|
|
|
|
#import <SaxObjC/SaxContentHandler.h>
|
|
|
|
#import <SaxObjC/SaxLexicalHandler.h>
|
|
|
|
#import <SaxObjC/SaxXMLReader.h>
|
|
|
|
#import <SaxObjC/SaxXMLReaderFactory.h>
|
|
|
|
#import <NGExtensions/NSString+misc.h>
|
|
|
|
#import <NGObjWeb/SoObjects.h>
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-02-15 22:04:31 +01:00
|
|
|
#import "UIxMailPartHTMLViewer.h"
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-08-20 19:46:15 +02:00
|
|
|
#if 0
|
2007-02-15 22:04:31 +01:00
|
|
|
#define showWhoWeAre() NSLog(@"invoked '%@'", NSStringFromSelector(_cmd))
|
2007-08-20 19:46:15 +02:00
|
|
|
#else
|
|
|
|
#define showWhoWeAre()
|
|
|
|
#endif
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-02-15 22:04:31 +01:00
|
|
|
@interface _UIxHTMLMailContentHandler : NSObject <SaxContentHandler, SaxLexicalHandler>
|
|
|
|
{
|
|
|
|
NSMutableString *result;
|
|
|
|
NSMutableString *css;
|
|
|
|
NSDictionary *attachmentIds;
|
|
|
|
BOOL inBody;
|
|
|
|
BOOL inStyle;
|
|
|
|
BOOL inScript;
|
|
|
|
BOOL inCSSDeclaration;
|
2007-02-26 17:37:59 +01:00
|
|
|
BOOL hasEmbeddedCSS;
|
2007-02-15 22:04:31 +01:00
|
|
|
NSMutableArray *crumb;
|
|
|
|
}
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-02-15 22:04:31 +01:00
|
|
|
- (NSString *) result;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2007-02-15 22:04:31 +01:00
|
|
|
@implementation _UIxHTMLMailContentHandler
|
|
|
|
|
|
|
|
- (id) init
|
|
|
|
{
|
|
|
|
if ((self = [super init]))
|
|
|
|
{
|
|
|
|
crumb = nil;
|
|
|
|
css = nil;
|
|
|
|
result = nil;
|
|
|
|
attachmentIds = nil;
|
|
|
|
}
|
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) dealloc
|
|
|
|
{
|
2007-09-07 17:45:46 +02:00
|
|
|
[crumb release];
|
|
|
|
[result release];
|
|
|
|
[css release];
|
2007-02-15 22:04:31 +01:00
|
|
|
[super dealloc];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) setAttachmentIds: (NSDictionary *) newAttachmentIds
|
|
|
|
{
|
|
|
|
attachmentIds = newAttachmentIds;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (NSString *) css
|
|
|
|
{
|
2007-09-07 17:45:46 +02:00
|
|
|
return css;
|
2007-02-15 22:04:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
- (NSString *) result
|
|
|
|
{
|
2007-09-07 17:45:46 +02:00
|
|
|
return result;
|
2007-02-15 22:04:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* SaxContentHandler */
|
|
|
|
- (void) startDocument
|
|
|
|
{
|
2007-08-20 19:46:15 +02:00
|
|
|
showWhoWeAre();
|
|
|
|
|
2007-09-07 17:45:46 +02:00
|
|
|
[crumb release];
|
|
|
|
[css release];
|
|
|
|
[result release];
|
2007-02-15 22:04:31 +01:00
|
|
|
|
|
|
|
result = [NSMutableString new];
|
|
|
|
css = [NSMutableString new];
|
|
|
|
crumb = [NSMutableArray new];
|
2007-09-07 17:45:46 +02:00
|
|
|
|
2007-02-15 22:04:31 +01:00
|
|
|
inBody = NO;
|
|
|
|
inStyle = NO;
|
|
|
|
inScript = NO;
|
|
|
|
inCSSDeclaration = NO;
|
2007-02-26 17:37:59 +01:00
|
|
|
hasEmbeddedCSS = NO;
|
2007-02-15 22:04:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void) endDocument
|
|
|
|
{
|
|
|
|
unsigned int count, max;
|
|
|
|
|
2007-08-20 19:46:15 +02:00
|
|
|
|
|
|
|
showWhoWeAre();
|
2007-02-15 22:04:31 +01:00
|
|
|
max = [crumb count];
|
|
|
|
if (max > 0)
|
|
|
|
for (count = max - 1; count > -1; count--)
|
|
|
|
{
|
|
|
|
[result appendFormat: @"</%@>", [crumb objectAtIndex: count]];
|
|
|
|
[crumb removeObjectAtIndex: count];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) startPrefixMapping: (NSString *)_prefix
|
|
|
|
uri: (NSString *)_uri
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) endPrefixMapping: (NSString *)_prefix
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) _appendStyle: (unichar *) _chars
|
|
|
|
length: (int) _len
|
|
|
|
{
|
|
|
|
unsigned int count;
|
|
|
|
unichar *start, *currentChar;
|
|
|
|
|
|
|
|
start = _chars;
|
|
|
|
currentChar = start;
|
|
|
|
for (count = 0; count < _len; count++)
|
|
|
|
{
|
|
|
|
currentChar = _chars + count;
|
|
|
|
if (inCSSDeclaration)
|
|
|
|
{
|
|
|
|
if (*(char *) currentChar == '}')
|
2007-02-26 17:37:59 +01:00
|
|
|
{
|
|
|
|
inCSSDeclaration = NO;
|
|
|
|
hasEmbeddedCSS = NO;
|
|
|
|
}
|
2007-02-15 22:04:31 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (*(char *) currentChar == '{')
|
|
|
|
inCSSDeclaration = YES;
|
2007-02-26 17:37:59 +01:00
|
|
|
if (*(char *) currentChar == ',')
|
|
|
|
hasEmbeddedCSS = NO;
|
|
|
|
else if (!hasEmbeddedCSS)
|
2007-02-15 22:04:31 +01:00
|
|
|
{
|
2007-02-26 17:37:59 +01:00
|
|
|
if (*(char *) currentChar == '@')
|
|
|
|
hasEmbeddedCSS = YES;
|
|
|
|
else
|
|
|
|
if (*(char *) currentChar > 32)
|
|
|
|
{
|
|
|
|
[css appendString: [NSString stringWithCharacters: start
|
|
|
|
length: (currentChar - start)]];
|
|
|
|
[css appendString: @".SOGoHTMLMail-CSS-Delimiter "];
|
|
|
|
hasEmbeddedCSS = YES;
|
|
|
|
start = currentChar;
|
|
|
|
}
|
2007-02-15 22:04:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
[css appendString: [NSString stringWithCharacters: start
|
2007-02-26 17:37:59 +01:00
|
|
|
length: (currentChar - start)]];
|
2007-02-15 22:04:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void) startElement: (NSString *) _localName
|
|
|
|
namespace: (NSString *) _ns
|
|
|
|
rawName: (NSString *) _rawName
|
|
|
|
attributes: (id <SaxAttributes>) _attributes
|
|
|
|
{
|
|
|
|
unsigned int count, max;
|
|
|
|
NSString *name, *value;
|
|
|
|
NSMutableString *resultPart;
|
|
|
|
BOOL skipAttribute;
|
|
|
|
|
2007-08-20 19:46:15 +02:00
|
|
|
showWhoWeAre();
|
2007-02-15 22:04:31 +01:00
|
|
|
if (inStyle || inScript)
|
|
|
|
;
|
|
|
|
else if ([_localName caseInsensitiveCompare: @"body"] == NSOrderedSame)
|
|
|
|
inBody = YES;
|
|
|
|
else if ([_localName caseInsensitiveCompare: @"script"] == NSOrderedSame)
|
|
|
|
inScript = YES;
|
|
|
|
else if ([_localName caseInsensitiveCompare: @"style"] == NSOrderedSame)
|
|
|
|
inStyle = YES;
|
|
|
|
else if (inBody)
|
|
|
|
{
|
|
|
|
resultPart = [NSMutableString new];
|
|
|
|
[resultPart appendFormat: @"<%@", _rawName];
|
|
|
|
|
|
|
|
max = [_attributes count];
|
|
|
|
for (count = 0; count < max; count++)
|
|
|
|
{
|
|
|
|
skipAttribute = NO;
|
|
|
|
name = [_attributes nameAtIndex: count];
|
2007-02-26 17:37:59 +01:00
|
|
|
if ([[name lowercaseString] hasPrefix: @"on"])
|
2007-02-15 22:04:31 +01:00
|
|
|
skipAttribute = YES;
|
|
|
|
else if ([name caseInsensitiveCompare: @"src"] == NSOrderedSame)
|
|
|
|
{
|
|
|
|
value = [_attributes valueAtIndex: count];
|
|
|
|
if ([value hasPrefix: @"cid:"])
|
|
|
|
{
|
|
|
|
value = [attachmentIds
|
|
|
|
objectForKey: [value substringFromIndex: 4]];
|
|
|
|
skipAttribute = (value == nil);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
skipAttribute = YES;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
value = [_attributes valueAtIndex: count];
|
|
|
|
if (!skipAttribute)
|
|
|
|
[resultPart appendFormat: @" %@=\"%@\"",
|
|
|
|
name, [value stringByReplacingString: @"\""
|
|
|
|
withString: @"\\\""]];
|
|
|
|
}
|
|
|
|
|
|
|
|
[resultPart appendString: @">"];
|
|
|
|
[result appendString: resultPart];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-09-07 17:45:46 +02:00
|
|
|
- (void) _finishCSS
|
|
|
|
{
|
|
|
|
[css replaceString: @".SOGoHTMLMail-CSS-Delimiter body"
|
|
|
|
withString: @".SOGoHTMLMail-CSS-Delimiter"];
|
|
|
|
[css replaceString: @";" withString: @" !important;"];
|
|
|
|
[css replaceString: @"<!--" withString: @""];
|
|
|
|
[css replaceString: @"-->" withString: @""];
|
|
|
|
}
|
|
|
|
|
2007-02-15 22:04:31 +01:00
|
|
|
- (void) endElement: (NSString *) _localName
|
|
|
|
namespace: (NSString *) _ns
|
|
|
|
rawName: (NSString *) _rawName
|
|
|
|
{
|
2007-08-20 19:46:15 +02:00
|
|
|
showWhoWeAre();
|
|
|
|
|
2007-02-15 22:04:31 +01:00
|
|
|
if (inStyle)
|
|
|
|
{
|
|
|
|
if ([_localName caseInsensitiveCompare: @"style"] == NSOrderedSame)
|
|
|
|
{
|
|
|
|
inStyle = NO;
|
|
|
|
inCSSDeclaration = NO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (inScript)
|
|
|
|
inScript = ([_localName caseInsensitiveCompare: @"script"] != NSOrderedSame);
|
|
|
|
else if (inBody)
|
|
|
|
{
|
|
|
|
if ([_localName caseInsensitiveCompare: @"body"] == NSOrderedSame)
|
2007-09-07 17:45:46 +02:00
|
|
|
{
|
|
|
|
inBody = NO;
|
|
|
|
if (css)
|
|
|
|
[self _finishCSS];
|
|
|
|
}
|
2007-02-15 22:04:31 +01:00
|
|
|
else
|
|
|
|
[result appendFormat: @"</%@>", _localName];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) characters: (unichar *) _chars
|
|
|
|
length: (int) _len
|
|
|
|
{
|
|
|
|
NSString *tmpString;
|
|
|
|
|
2007-08-20 19:46:15 +02:00
|
|
|
showWhoWeAre();
|
2007-02-15 22:04:31 +01:00
|
|
|
if (!inScript)
|
|
|
|
{
|
|
|
|
if (inStyle)
|
|
|
|
[self _appendStyle: _chars length: _len];
|
2007-09-07 17:45:46 +02:00
|
|
|
else if (inBody)
|
2007-02-15 22:04:31 +01:00
|
|
|
{
|
|
|
|
tmpString = [NSString stringWithCharacters: _chars length: _len];
|
|
|
|
[result appendString: [tmpString stringByEscapingHTMLString]];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) ignorableWhitespace: (unichar *) _chars
|
|
|
|
length: (int) _len
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) processingInstruction: (NSString *) _pi
|
|
|
|
data: (NSString *) _data
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) setDocumentLocator: (id <NSObject, SaxLocator>) _locator
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) skippedEntity: (NSString *) _entityName
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* SaxLexicalHandler */
|
|
|
|
- (void) comment: (unichar *) _chars
|
|
|
|
length: (int) _len
|
|
|
|
{
|
2007-08-20 19:46:15 +02:00
|
|
|
showWhoWeAre();
|
2007-02-15 22:04:31 +01:00
|
|
|
if (inStyle)
|
|
|
|
[self _appendStyle: _chars length: _len];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) startDTD: (NSString *) _name
|
|
|
|
publicId: (NSString *) _pub
|
|
|
|
systemId: (NSString *) _sys
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) endDTD
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) startEntity: (NSString *) _name
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) endEntity: (NSString *) _name
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) startCDATA
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) endCDATA
|
|
|
|
{
|
|
|
|
showWhoWeAre();
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSDictionary (SOGoDebug)
|
|
|
|
|
|
|
|
- (void) dump;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation NSDictionary (SOGoDebug)
|
|
|
|
|
|
|
|
- (void) dump
|
|
|
|
{
|
|
|
|
NSEnumerator *keys;
|
|
|
|
NSString *key;
|
|
|
|
NSMutableString *dump;
|
|
|
|
|
|
|
|
dump = [NSMutableString new];
|
|
|
|
[dump appendFormat: @"\nNSDictionary dump (%@):\n", self];
|
|
|
|
keys = [[self allKeys] objectEnumerator];
|
|
|
|
key = [keys nextObject];
|
|
|
|
while (key)
|
|
|
|
{
|
|
|
|
[dump appendFormat: @"%@: %@\n", key, [self objectForKey: key]];
|
|
|
|
key = [keys nextObject];
|
|
|
|
}
|
|
|
|
[dump appendFormat: @"--- end ---\n"];
|
|
|
|
|
|
|
|
NSLog (dump);
|
|
|
|
[dump release];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
@implementation UIxMailPartHTMLViewer
|
2007-02-15 22:04:31 +01:00
|
|
|
|
2007-09-07 17:45:46 +02:00
|
|
|
- (id) init
|
|
|
|
{
|
|
|
|
if ((self = [super init]))
|
|
|
|
{
|
|
|
|
handler = nil;
|
|
|
|
}
|
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) dealloc
|
|
|
|
{
|
|
|
|
[handler release];
|
|
|
|
[super dealloc];
|
|
|
|
}
|
|
|
|
|
2007-02-15 22:04:31 +01:00
|
|
|
- (void) _convertReferencesForPart: (NSDictionary *) part
|
|
|
|
withCount: (unsigned int) count
|
|
|
|
andBaseURL: (NSString *) url
|
|
|
|
intoDictionary: (NSMutableDictionary *) attachmentIds
|
|
|
|
{
|
|
|
|
NSString *bodyId;
|
|
|
|
|
|
|
|
bodyId = [part objectForKey: @"bodyId"];
|
|
|
|
if ([bodyId length] > 0)
|
|
|
|
{
|
|
|
|
if ([bodyId hasPrefix: @"<"])
|
|
|
|
bodyId = [bodyId substringFromIndex: 1];
|
|
|
|
if ([bodyId hasSuffix: @">"])
|
|
|
|
bodyId = [bodyId substringToIndex: [bodyId length] - 1];
|
|
|
|
[attachmentIds setObject: [url stringByAppendingFormat: @"/%d", count]
|
|
|
|
forKey: bodyId];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- (NSDictionary *) _attachmentIds
|
|
|
|
{
|
|
|
|
NSMutableDictionary *attachmentIds;
|
|
|
|
UIxMailPartViewer *parent;
|
|
|
|
unsigned int count, max;
|
2007-03-30 16:34:10 +02:00
|
|
|
NSMutableString *url;
|
2007-02-15 22:04:31 +01:00
|
|
|
NSString *baseURL;
|
|
|
|
NSArray *parts;
|
|
|
|
|
|
|
|
attachmentIds = [NSMutableDictionary new];
|
|
|
|
[attachmentIds autorelease];
|
|
|
|
|
|
|
|
parent = [self parent];
|
|
|
|
if ([NSStringFromClass ([parent class])
|
|
|
|
isEqualToString: @"UIxMailPartAlternativeViewer"])
|
|
|
|
{
|
|
|
|
baseURL = [[self clientObject] baseURLInContext: context];
|
2007-03-30 16:34:10 +02:00
|
|
|
url = [NSMutableString new];
|
|
|
|
[url appendString: baseURL];
|
|
|
|
[url appendFormat: @"/%@", [partPath componentsJoinedByString: @"/"]];
|
2007-11-08 22:57:30 +01:00
|
|
|
[url deleteCharactersInRange: NSMakeRange([url length] - 2, 2)];
|
2007-02-15 22:04:31 +01:00
|
|
|
parts = [[parent bodyInfo] objectForKey: @"parts"];
|
|
|
|
max = [parts count];
|
|
|
|
for (count = 0; count < max; count++)
|
|
|
|
[self _convertReferencesForPart: [parts objectAtIndex: count]
|
|
|
|
withCount: count + 1
|
2007-03-30 16:34:10 +02:00
|
|
|
andBaseURL: url
|
2007-02-15 22:04:31 +01:00
|
|
|
intoDictionary: attachmentIds];
|
2007-03-30 16:34:10 +02:00
|
|
|
[url release];
|
2007-02-15 22:04:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return attachmentIds;
|
|
|
|
}
|
|
|
|
|
2007-09-07 17:45:46 +02:00
|
|
|
- (void) _parseContent
|
2007-02-15 22:04:31 +01:00
|
|
|
{
|
|
|
|
id <NSObject, SaxXMLReader> parser;
|
2007-08-20 19:46:15 +02:00
|
|
|
NSData *preparsedContent;
|
|
|
|
|
|
|
|
preparsedContent = [super decodedFlatContent];
|
2007-02-15 22:04:31 +01:00
|
|
|
parser = [[SaxXMLReaderFactory standardXMLReaderFactory]
|
|
|
|
createXMLReaderForMimeType: @"text/html"];
|
|
|
|
|
|
|
|
handler = [_UIxHTMLMailContentHandler new];
|
|
|
|
[handler setAttachmentIds: [self _attachmentIds]];
|
|
|
|
[parser setContentHandler: handler];
|
|
|
|
[parser parseFromSource: preparsedContent];
|
2007-09-07 17:45:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
- (NSString *) cssContent
|
|
|
|
{
|
|
|
|
NSString *cssContent, *css;
|
|
|
|
|
|
|
|
if (!handler)
|
|
|
|
[self _parseContent];
|
2007-02-15 22:04:31 +01:00
|
|
|
|
|
|
|
css = [handler css];
|
|
|
|
if ([css length])
|
2007-11-19 21:01:27 +01:00
|
|
|
cssContent
|
|
|
|
= [NSString stringWithFormat: @"<style type=\"text/css\">%@</style>",
|
|
|
|
[handler css]];
|
2007-09-07 17:45:46 +02:00
|
|
|
else
|
|
|
|
cssContent = @"";
|
|
|
|
|
|
|
|
return cssContent;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (NSString *) flatContentAsString
|
|
|
|
{
|
|
|
|
if (!handler)
|
|
|
|
[self _parseContent];
|
2007-02-15 22:04:31 +01:00
|
|
|
|
2007-09-07 17:45:46 +02:00
|
|
|
return [handler result];
|
2007-02-15 22:04:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|