[
https://issues.apache.org/jira/browse/TIKA-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15048992#comment-15048992
]
Tim Allison commented on TIKA-1808:
-----------------------------------
Same thing unfortunately (at least with default settings):
{noformat}
<head>
<meta name="X-UA-Compatible" content="IE=11.0000" />
<meta name="GENERATOR" content="MSHTML 11.00.9600.18125" />
<meta name="X-Parsed-By" content="org.apache.tika.parser.DefaultParser" />
<meta name="X-Parsed-By" content="org.apache.tika.parser.html.HtmlParser" />
<meta name="viewport" content="width=device-width, initial-scale=1.0,
minimum-scale=1.0 maximum-scale=1.0, minimal-ui" />
<meta name="Content-Encoding" content="UTF-8" />
<meta name="Content-Type-Hint" content="text/html; charset=utf-8" />
<meta name="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
{noformat}
> Head section closed too eager
> -----------------------------
>
> Key: TIKA-1808
> URL: https://issues.apache.org/jira/browse/TIKA-1808
> Project: Tika
> Issue Type: Bug
> Components: parser
> Affects Versions: 1.11
> Reporter: Markus Jelsma
> Fix For: 1.12
>
>
> XHTMLContentHandler has some logic that closes the head section too early, or
> this is a problem in TagSoup. In this [1] case a <div> element appears in the
> head, causing the head to be closed. Subsequent <head> elements do not appear
> in custom ContentHandlers so i cannot read the document's title, or any other
> meta tags.
> It can be fixed by using a custom HTMLSchema in the ParseContext, e.g.
> schema.elementType("div", HTMLSchema.M_EMPTY, 65535, 0); but this isn't
> really an elegant solution.
> [1] http://www.aljazeera.com/news/2015/05/150516182251747.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)