You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2010/08/12 18:12:18 UTC

[jira] Commented: (TIKA-478) HtmlParser can emit elements inside of block

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

Jukka Zitting commented on TIKA-478:
------------------------------------

Oh, I see now where this problem with <meta/> elements is coming from.

One reasonably clean way to solve this would be to disable the output of <meta/> elements from HtmlHandler while keeping the code that sets the respective Metadata entries. Then in XHTMLContentHandler we'd modify the lazyStartDocument() method to output not just the <title/> element but the full set of collected metadata as <meta/> elements. We could also set the lang attribute (or xml:lang?) of the <html/> element if the respective Metadata entry is set.

The nice thing about this solution would be that the inclusion of metadata in <head/> would work also for other document types beyond HTML.

> 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
>
>
> 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.