aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hoa V. Dinh <dinh.viet.hoa@gmail.com>2014-02-11 12:18:21 -0800
committerGravatar Hoa V. Dinh <dinh.viet.hoa@gmail.com>2014-02-11 12:18:33 -0800
commit88d78a63ba811bc232b0bb5f734560b39f683685 (patch)
treedf472126f4631d7b2a6576c73ff0cd838a1ce6a5
parentf63e036efe20190299774d2911a88a6e32ce267c (diff)
Fixed build
-rw-r--r--src/core/basetypes/MCHTMLCleaner.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/basetypes/MCHTMLCleaner.cc b/src/core/basetypes/MCHTMLCleaner.cc
index 04b83763..78d2461a 100644
--- a/src/core/basetypes/MCHTMLCleaner.cc
+++ b/src/core/basetypes/MCHTMLCleaner.cc
@@ -17,6 +17,10 @@
#include "MCUtils.h"
#include "MCLog.h"
+#if __APPLE__
+#include <TargetConditionals.h>
+#endif
+
using namespace mailcore;
String * HTMLCleaner::cleanHTML(String * input)
@@ -34,7 +38,10 @@ String * HTMLCleaner::cleanHTML(String * input)
Data * data = input->dataUsingEncoding("utf-8");
tidyBufAppend(&docbuf, data->bytes(), data->length());
+#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
+ // This option is not available on the Mac.
tidyOptSetBool(tdoc, TidyDropEmptyElems, no);
+#endif
tidyOptSetBool(tdoc, TidyXhtmlOut, yes);
tidySetCharEncoding(tdoc, "utf8");
tidyOptSetBool(tdoc, TidyForceOutput, yes);