You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Andreas Janning (Created) (JIRA)" <ji...@apache.org> on 2012/01/17 17:27:41 UTC
[jira] [Created] (NUTCH-1250) parse-html does not parse links with
empty anchor
parse-html does not parse links with empty anchor
-------------------------------------------------
Key: NUTCH-1250
URL: https://issues.apache.org/jira/browse/NUTCH-1250
Project: Nutch
Issue Type: Bug
Components: parser
Affects Versions: 1.4
Reporter: Andreas Janning
The parse-html plugin does not generate an outlink if the link has no anchor
For example the following HTML-Code does not create an Outlink:
{code:html}
<a href="example.com"></a>
{code}
The JUnit-Test TestDOMContentUtils tries to test this but fails since there is a comment inside the <a>-Tag.
{code:title=TestDOMContentUtils.java|borderStyle=solid}
new String("<html><head><title> title </title>"
+ "</head><body>"
+ "<a href=\"g\"><!--no anchor--></a>"
+ "<a href=\"g1\"> <!--whitespace--> </a>"
+ "<a href=\"g2\"> <img src=test.gif alt='bla bla'> </a>"
+ "</body></html>"),
{code}
When you remove the comment the test fails.
{code:title=TestDOMContentUtils.java Test fails|borderStyle=solid}
new String("<html><head><title> title </title>"
+ "</head><body>"
+ "<a href=\"g\"></a>" // no anchor
+ "<a href=\"g1\"> <!--whitespace--> </a>"
+ "<a href=\"g2\"> <img src=test.gif alt='bla bla'> </a>"
+ "</body></html>"),
{code}
--
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