[ https://issues.apache.org/jira/browse/TIKA-3710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17539054#comment-17539054 ]
Sam Stephens commented on TIKA-3710: ------------------------------------ {quote}The h1 isn't quite as unique as we might like, and maybe not as good as some of the other ones {quote} Honestly, I'm not so worried about the HTML fragment detection, because that's never going to be perfect. A bare text string without any HTML tags is technically an HTML fragment. In the modern world where people can and do define their own HTML tags, you _could_ say that any file opens with a valid tag as defined by the W3C is HTML, but that feels open to false positives. > HTML document detected incorrect as message/rfc822 > -------------------------------------------------- > > Key: TIKA-3710 > URL: https://issues.apache.org/jira/browse/TIKA-3710 > Project: Tika > Issue Type: Bug > Components: detector > Affects Versions: 2.3.0 > Reporter: Sam Stephens > Priority: Major > Attachments: html-that-looks-like-rfc822.html > > > I'm detecting content types and extracting text from documents using the > AutoDetectParser. > I've received some documents that are HTML fragments generated from emails. > The documents are clearly HTML, not emails, but the AutoDetectParser gives me > the MIME type message/rfc822 and no text. I've attached an example. > It looks like the presence of From:, Sent:, and Subject: at the beginning of > lines is why the documents are matching RFC822. However, I believe the > presence of HTML before these headers means the document is not valid RFC822. -- This message was sent by Atlassian Jira (v8.20.7#820007)