You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2015/04/06 15:53:12 UTC

[jira] [Commented] (TIKA-1519) Don't allow whatever is in http-equiv Content-Type to overwrite actual Content-Type in HtmlParser

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

Hudson commented on TIKA-1519:
------------------------------

SUCCESS: Integrated in tika-trunk-jdk1.7 #605 (See [https://builds.apache.org/job/tika-trunk-jdk1.7/605/])
TIKA-1519 - don't allow potentially erroneous http-equiv Content-Type to overwrite Content-Type in HtmlParser (tallison: http://svn.apache.org/viewvc/tika/trunk/?view=rev&rev=1671533)
* /tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/TikaCoreProperties.java
* /tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/html/HtmlHandler.java
* /tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/html/HtmlParserTest.java


> Don't allow whatever is in http-equiv Content-Type to overwrite actual Content-Type in HtmlParser
> -------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-1519
>                 URL: https://issues.apache.org/jira/browse/TIKA-1519
>             Project: Tika
>          Issue Type: Bug
>    Affects Versions: 1.6
>            Reporter: Tim Allison
>            Priority: Trivial
>             Fix For: 1.8
>
>
> The HtmlParser will overwrite the value of Content-Type in Metadata with any value of content in an http-equiv=Content-Type header, e.g.
> {noformat}
> <meta http-equiv=Content-Type content="blah de blah blah">{noformat}.
> or even worse, perhaps:
> <meta http-equiv=Content-Type content="application/pdf">
> Let's capture the content type alleged by the html file in a different key from Content-Type; I'd prefer to reserve Content-Type for "text/html; charset=X".
> Candidate key/Property: Content-Type-Meta-HTTP-Equiv?
> See TIKA-1514 for example output.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)