+2007-12-12 Ludovic Marcotte <ludovic@inverse.ca>
+
+ * UI/MailPartViewers/UIxMailRenderingContext.{h,m}
+ Removed template caching which added very little
+ and created re-entrant issues.
+
+ * UI/MailPartViewers/UIxMailPartHTMLViewer.m
+ Added a hack (and stated so in the source file)
+ to avoid what seems to be a bug in libxml.
+
2007-12-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoContentObject.m ([SOGoContentObject
- (void) characters: (unichar *) _chars
length: (int) _len
{
- NSString *tmpString;
-
showWhoWeAre();
if (!inScript)
{
[self _appendStyle: _chars length: _len];
else if (inBody)
{
+ NSString *tmpString;
+
tmpString = [NSString stringWithCharacters: _chars length: _len];
- [result appendString: [tmpString stringByEscapingHTMLString]];
+
+ // HACK: This is to avoid appending the useless junk in the <html> tag
+ // that Outlook adds. It seems to confuse the XML parser for
+ // forwarded messages as we get this in the _body_ of the email
+ // while we really aren't in it!
+ if (![tmpString hasPrefix: @" xmlns:v=\"urn:schemas-microsoft-com:vml\""])
+ [result appendString: [tmpString stringByEscapingHTMLString]];
}
}
}
WOComponent *viewer; /* non-retained! */
WOContext *context; /* non-retained! */
NSDictionary *flatContents; /* IMAP4 name to NSData */
-
- WOComponent *textViewer;
- WOComponent *imageViewer;
- WOComponent *linkViewer;
- WOComponent *messageViewer;
- WOComponent *iCalViewer;
- WOComponent *htmlViewer;
}
- (id) initWithViewer: (WOComponent *) _viewer
- (void) dealloc
{
[flatContents release];
- [iCalViewer release];
- [htmlViewer release];
- [textViewer release];
- [imageViewer release];
- [linkViewer release];
- [messageViewer release];
[super dealloc];
}
- (void) reset
{
[flatContents release];
- [iCalViewer release];
- [htmlViewer release];
- [textViewer release];
- [imageViewer release];
- [linkViewer release];
- [messageViewer release];
-
flatContents = nil;
- iCalViewer = nil;
- textViewer = nil;
- imageViewer = nil;
- htmlViewer = nil;
- linkViewer = nil;
- messageViewer = nil;
}
/* fetching */
- (WOComponent *) textViewer
{
- if (!textViewer)
- {
- textViewer = [viewer pageWithName: @"UIxMailPartTextViewer"];
- [textViewer retain];
- }
-
- return textViewer;
+ return [viewer pageWithName: @"UIxMailPartTextViewer"];
}
- (WOComponent *) imageViewer
{
- if (!imageViewer)
- {
- imageViewer = [viewer pageWithName: @"UIxMailPartImageViewer"];
- [imageViewer retain];
- }
-
- return imageViewer;
+ return [viewer pageWithName: @"UIxMailPartImageViewer"];
}
- (WOComponent *) linkViewer
{
- if (!linkViewer)
- {
- linkViewer = [viewer pageWithName: @"UIxMailPartLinkViewer"];
- [linkViewer retain];
- }
-
- return linkViewer;
+ return [viewer pageWithName: @"UIxMailPartLinkViewer"];
}
- (WOComponent *) htmlViewer
{
- if (!htmlViewer)
- {
- htmlViewer = [viewer pageWithName: @"UIxMailPartHTMLViewer"];
- [htmlViewer retain];
- }
-
- return htmlViewer;
+ return [viewer pageWithName: @"UIxMailPartHTMLViewer"];
}
- (WOComponent *) messageViewer
{
- if (!messageViewer)
- {
- messageViewer = [viewer pageWithName: @"UIxMailPartMessageViewer"];
- [messageViewer retain];
- }
-
- return messageViewer;
+ return [viewer pageWithName: @"UIxMailPartMessageViewer"];
}
- (WOComponent *) iCalViewer
{
- if (!iCalViewer)
- {
- iCalViewer = [viewer pageWithName: @"UIxMailPartICalViewer"];
- [iCalViewer retain];
- }
-
- return iCalViewer;
+ return [viewer pageWithName: @"UIxMailPartICalViewer"];
}
/* Kolab viewers */