2015-08-27 17:47:51 +02:00
|
|
|
/* UIxMailPartTextViewer.m - this file is part of $PROJECT_NAME_HERE$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006-2015 Inverse inc.
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
|
|
|
/*
|
|
|
|
UIxMailPartTextViewer
|
|
|
|
|
2006-09-19 23:09:11 +02:00
|
|
|
Show plaintext mail parts correctly formatted.
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
TODO: add server side wrapping.
|
|
|
|
TODO: add contained link detection.
|
|
|
|
*/
|
|
|
|
|
2007-11-13 23:17:09 +01:00
|
|
|
#import <Foundation/NSException.h>
|
|
|
|
|
2007-07-30 16:12:21 +02:00
|
|
|
#import <NGExtensions/NSString+misc.h>
|
2007-05-15 22:52:38 +02:00
|
|
|
|
2007-07-30 16:12:21 +02:00
|
|
|
#import <SoObjects/SOGo/NSString+Utilities.h>
|
2009-06-23 19:53:18 +02:00
|
|
|
#import <SoObjects/Mailer/NSString+Mail.h>
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2006-09-19 23:09:11 +02:00
|
|
|
#import "UIxMailPartTextViewer.h"
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
@implementation UIxMailPartTextViewer
|
|
|
|
|
2006-09-19 23:06:59 +02:00
|
|
|
- (NSString *) flatContentAsString
|
2006-09-19 23:06:47 +02:00
|
|
|
{
|
2007-05-22 20:41:02 +02:00
|
|
|
NSString *superContent;
|
2007-05-15 22:52:38 +02:00
|
|
|
|
|
|
|
superContent = [[super flatContentAsString] stringByEscapingHTMLString];
|
|
|
|
|
2007-12-13 00:56:23 +01:00
|
|
|
return [[superContent stringByDetectingURLs]
|
|
|
|
stringByConvertingCRLNToHTML];
|
2006-09-19 23:06:47 +02:00
|
|
|
}
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@end /* UIxMailPartTextViewer */
|