tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Krugler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TIKA-914) Invalid self-closing title tag when parsing an RTF file
Date Tue, 08 May 2012 02:27:49 GMT

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

Ken Krugler commented on TIKA-914:
----------------------------------

I generated XHTML 1.0 (Strict) and XHTML 1.1 documents with <title/> tags, and they
both passed validation (with BBEdit's built-in validator, and xmllint).

So it's possible that there's stricter validation I should be doing, but on the surface this
looks like the case of valid-but-uncommon XHTML that causes a problem for Chrome.

If so, then this means that Tika should be changed to avoid generating <title/> tags,
but it's more of an enhancement than a bug fix.
                
> Invalid self-closing title tag when parsing an RTF file
> -------------------------------------------------------
>
>                 Key: TIKA-914
>                 URL: https://issues.apache.org/jira/browse/TIKA-914
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.1
>         Environment: Reproduced on Linux and Windows
>            Reporter: Nicolas Guillaumin
>            Priority: Minor
>              Labels: rtf
>         Attachments: test.rtf
>
>
> When parsing an RTF file with an empty TITLE metadata, the resulting HTML contains an
self-closing title tag:
> {code}
> $ java -jar tika-app-1.1.jar -h test.rtf
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta name="Content-Length" content="830468"/>
> <meta name="Content-Type" content="application/rtf"/>
> <meta name="resourceName" content="test.rtf"/>
> <title/>
> </head>
> [...]
> {code}
> I believe self-closing tags are not valid in XHTML, according to http://www.w3.org/TR/xhtml1/#C_3
(However there's no XHTML doctype generated here, just a namespace...). Anyway this causes
some browsers like Chrome to fail parsing the HTML, resulting in a blank page displayed.
> The expected output would be a non self-closing empty tag: {{<title></title>}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message