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

Tim Allison commented on TIKA-381:
----------------------------------

JSoup appears to maintain the '\n'...i.e. it doesn't seem to fix the link:

{noformat}
        String test = "<html><body><a href=\"http://goog\n"; +
                "le.com\">link</a>body</body></html>";
        Metadata metadata = new Metadata();
        ContentHandler handler = new ToXMLContentHandler("UTF-8");
            new HtmlParser().parse(
                    new ByteArrayInputStream(test.getBytes(UTF_8)),
                    handler, metadata, new ParseContext());
        String content = handler.toString();
        assertContains("goog\nle.com", content);
{noformat}

> HtmlParser should strip linefeeds out of links
> ----------------------------------------------
>
>                 Key: TIKA-381
>                 URL: https://issues.apache.org/jira/browse/TIKA-381
>             Project: Tika
>          Issue Type: Improvement
>          Components: parser
>    Affects Versions: 1.8
>            Reporter: Ken Krugler
>            Assignee: Ken Krugler
>
> A number of HTML pages contain links where the URL has a linefeed in the 
> middle of it.
> Browsers such as Firefox will automatically remove the character but Tika 
> passes it back, which results in a broken URL.



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

Reply via email to