You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Hassan Akram (JIRA)" <ji...@apache.org> on 2014/06/09 14:05:02 UTC
[jira] [Comment Edited] (TIKA-1303) Parsing Html page (not well
formed) containing two title tags results in metadata (title) to be
overwritten
[ https://issues.apache.org/jira/browse/TIKA-1303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14023067#comment-14023067 ]
Hassan Akram edited comment on TIKA-1303 at 6/9/14 12:03 PM:
-------------------------------------------------------------
Hi Lewis, Thanks for your help.
I have created the patch file as instructed above.
The src code change is in following file:
tika-parsers/src/main/java/org/apache/tika/parser/html/HtmlHandler.java
A unit test has been added to following file to cover change above:
tika-parsers/src/test/java/org/apache/tika/parser/html/HtmlParserTest.java
Let me know if you need any more information on this.
Thanks
Hassan
was (Author: hakram):
Hi Lewis, Thanks for your help.
I have created the patch file as instructed above.
The src code change is following file:
tika-parsers/src/main/java/org/apache/tika/parser/html/HtmlHandler.java
Unit test has been added to following file to cover change above:
tika-parsers/src/test/java/org/apache/tika/parser/html/HtmlParserTest.java
Let me know if you need any more information on this.
Thanks
Hassan
> Parsing Html page (not well formed) containing two title tags results in metadata (title) to be overwritten
> -----------------------------------------------------------------------------------------------------------
>
> Key: TIKA-1303
> URL: https://issues.apache.org/jira/browse/TIKA-1303
> Project: Tika
> Issue Type: Bug
> Components: metadata, parser
> Affects Versions: 1.2, 1.3, 1.4, 1.5
> Reporter: Hassan Akram
> Priority: Minor
> Labels: patch
> Attachments: HtmlHandler.java, HtmlParserTest.java, TIKA-1303.patch
>
>
> While crawling following web page, we came accross a strange issue where by title for page was not being extracted accurately:
> http://www.samsung.com/us/support/faq/FAQ00052677/61239/SM-C105AZWAATT
> This html page is not well formed and contains two title tags (one in head and one is body):
> e.g. "<html><title>Simple Content</title><body><h1></h1><title>TitleToIgnore</title></body></html>"
> Now in this case a simple fix to htmlhandler could make sure that once title value has been set in metadata, it should not be overridden when another title tag is subsequently found.
> I am submitting fix for this issue as a path for review (1.5) - hoping that this could be committed to latest?
> Can you please review and update kindly.
--
This message was sent by Atlassian JIRA
(v6.2#6252)