Added one more sanitization pass on decoded content

This commit is contained in:
Ludovic Marcotte
2014-10-30 09:20:21 -04:00
parent 70cd24e111
commit d76a4361a0
+6 -1
View File
@@ -67,8 +67,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <Appointments/iCalPerson+SOGo.h>
#include <Mailer/NSString+Mail.h>
#include <Mailer/SOGoMailBodyPart.h>
#include <SOGo/SOGoUser.h>
#include <SOGo/NSString+Utilities.h>
typedef struct {
uint32_t dwLowDateTime;
@@ -323,6 +323,11 @@ struct GlobalObjectId {
if (s)
{
// We sanitize the content immediately, in case we have non-UNICODE safe
// characters that would be re-encoded later in HTML entities and thus,
// ignore afterwards.
s = [s safeString];
body = [s dataUsingEncoding: NSUTF8StringEncoding];
}