[
https://issues.apache.org/jira/browse/TIKA-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15049342#comment-15049342
]
Tim Allison edited comment on TIKA-1808 at 12/9/15 8:30 PM:
------------------------------------------------------------
I just started using JSoup today, so I'm not sure. I defer to others who have
more experience with it. It looks like there's a way to pass in a custom parser
to the main parse call, but if we have to build our own parser...are we really
getting much? There may be other options.
bq. we (i at least) are still are going to need configure exceptions for real
world crapsites.
I think users of Tika are often trying to parse the same crapsites you are...so
the more we can do together, the better! :)
was (Author: [email protected]):
I just started using JSoup today, so I'm not sure. I defer to others who have
more experience with it. It looks like there's a way to pass in a custom parser
to the main parse call, but if we have to build our own parser...are we really
getting much? There may be other options.
> 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)