From 04e26822348dcb59c6869802f96b5468a24a9628 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 15 Apr 2008 16:04:16 +0000 Subject: [PATCH] Monotone-Parent: 8ac4ae138ee646d9a599dc78aa95bfc951416d88 Monotone-Revision: 392d6631a429629bec7220b159f559a24caa910c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-04-15T16:04:16 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ UI/MailPartViewers/UIxMailPartHTMLViewer.m | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 962513b2d..243b773d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-04-15 Wolfgang Sourdeau + * UI/MailPartViewers/UIxMailPartHTMLViewer.m + ([_UIxHTMLMailContentHandler -characters:_charslength:_len]) + ([_UIxHTMLMailContentHandler -comment:_charslength:_len]): don't + cast the unichar data to char, to avoid issues with endianness + which prevents the CSS from being parsed properly. + * UI/MailerUI/UIxMailEditor.m ([UIxMailEditor -isMailReply]): new method that returns the JS values "true" or "false" as strings is the mail has a non-null count of recipients. diff --git a/UI/MailPartViewers/UIxMailPartHTMLViewer.m b/UI/MailPartViewers/UIxMailPartHTMLViewer.m index 94c7055de..9123ca868 100644 --- a/UI/MailPartViewers/UIxMailPartHTMLViewer.m +++ b/UI/MailPartViewers/UIxMailPartHTMLViewer.m @@ -171,7 +171,7 @@ currentChar = _chars + count; if (inCSSDeclaration) { - if (*(char *) currentChar == '}') + if (*currentChar == '}') { inCSSDeclaration = NO; hasEmbeddedCSS = NO; @@ -179,16 +179,16 @@ } else { - if (*(char *) currentChar == '{') + if (*currentChar == '{') inCSSDeclaration = YES; - if (*(char *) currentChar == ',') + if (*currentChar == ',') hasEmbeddedCSS = NO; else if (!hasEmbeddedCSS) { - if (*(char *) currentChar == '@') + if (*currentChar == '@') hasEmbeddedCSS = YES; else - if (*(char *) currentChar > 32) + if (*currentChar > 32) { [css appendString: [NSString stringWithCharacters: start length: (currentChar - start)]];