Monotone-Parent: 0e5da06a5c5166a41629d40ff43cf8d9f3b4335c

Monotone-Revision: 0417738db917e76880a84c6d4e6d8721c51cd310

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-05-15T20:52:38
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-05-15 20:52:38 +00:00
parent 7c0c9e0ef9
commit f9a225549a
3 changed files with 32 additions and 9 deletions
+12 -6
View File
@@ -28,6 +28,8 @@
TODO: add contained link detection.
*/
#import <SoObjects/SOGo/NSString+Utilities.h>
#import "common.h"
#import "UIxMailPartTextViewer.h"
@@ -36,14 +38,18 @@
- (NSString *) flatContentAsString
{
NSString *content;
NSMutableString *content;
NSString *superContent, *urlText, *newUrlText;
NSRange httpRange, rest, currentURL;
unsigned int length;
content = [[super flatContentAsString] stringByEscapingHTMLString];
content = [content stringByReplacingString: @"\r\n"
withString: @"<br />"];
content = [NSMutableString string];
superContent = [[super flatContentAsString] stringByEscapingHTMLString];
[content appendString: [superContent stringByDetectingURLs]];
[content replaceString: @"\r\n" withString: @"<br />"];
[content replaceString: @"\n" withString: @"<br />"];
return [content stringByReplacingString: @"\n"
withString: @"<br />"];
return content;
}
@end /* UIxMailPartTextViewer */