tika-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1213560 - /tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java
Date Tue, 13 Dec 2011 04:13:53 GMT
Author: nick
Date: Tue Dec 13 04:13:53 2011
New Revision: 1213560

URL: http://svn.apache.org/viewvc?rev=1213560&view=rev
Log:
TIKA-803 Wrap the outlook message body in a special div

Modified:
    tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java

Modified: tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java
URL: http://svn.apache.org/viewvc/tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java?rev=1213560&r1=1213559&r2=1213560&view=diff
==============================================================================
--- tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java
(original)
+++ tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java
Tue Dec 13 04:13:53 2011
@@ -182,6 +182,7 @@ public class OutlookExtractor extends Ab
            }
            
            boolean doneBody = false;
+           xhtml.startElement("div", "class", "message-body");
            if(htmlChunk != null) {
               byte[] data = null;
               if(htmlChunk instanceof ByteChunk) {
@@ -215,6 +216,7 @@ public class OutlookExtractor extends Ab
            if(textChunk != null && !doneBody) {
               xhtml.element("p", ((StringChunk)textChunk).getValue());
            }
+           xhtml.endElement("div");
            
            // Process the attachments
            for (AttachmentChunks attachment : msg.getAttachmentFiles()) {
@@ -245,7 +247,6 @@ public class OutlookExtractor extends Ab
                }
 
                xhtml.endElement("div");
-               
            }
         } catch(ChunkNotFoundException e) {
            throw new TikaException("POI MAPIMessage broken - didn't return null on missing
chunk", e);



Mime
View raw message