[ 
https://issues.apache.org/jira/browse/TIKA-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12897956#action_12897956
 ] 

Ken Krugler commented on TIKA-478:
----------------------------------

I ran into a test case failing when I applied my fix - looks like the epub 
parser calls XHTMLContentHandler with <head> elements, among others. This 
triggered the premature emitting of <title>. In order to guard against similar 
problems with other parsers, I modified XHTMLContentHandler to try to ignore 
startElement() calls with elements that would be auto-generated.


> HtmlParser can emit <head> elements inside of <body> block
> ----------------------------------------------------------
>
>                 Key: TIKA-478
>                 URL: https://issues.apache.org/jira/browse/TIKA-478
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.7
>            Reporter: Ken Krugler
>            Assignee: Ken Krugler
>            Priority: Critical
>             Fix For: 0.8
>
>         Attachments: TIKA-478.patch
>
>
> The change to fix [TIKA-379] causes a premature generation of HTML <head> 
> element and nested <title> by the XHTMLContentHandler being used by 
> HtmlHandler.
> This then creates issues for any downstream content handler, as they can then 
> get an empty <title> element, and <meta> elements inside of the <body> 
> element (which is invalid).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to