OSDN Git Service

Added logic to capture if an error happens when cleaning up the note with JTidy.
authorRandy Baumgarte <randy@fbn.cx>
Thu, 2 Sep 2010 18:34:54 +0000 (14:34 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Tue, 14 Sep 2010 10:23:34 +0000 (06:23 -0400)
src/cx/fbn/nevernote/evernote/EnmlConverter.java

index 8b37bca..128e7e6 100644 (file)
@@ -102,6 +102,9 @@ public class EnmlConverter {
                ByteArrayOutputStream os = new ByteArrayOutputStream();\r
                tidy.parse(is, os);\r
                newContent = os.toString();\r
+               \r
+               if (newContent.trim().equals(""))\r
+                       newContent = null;\r
 \r
                // If the repair above returned null, then the XML is foobar.\r
                // We are done here.\r