You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Jukka Zitting (Commented) (JIRA)" <ji...@apache.org> on 2011/10/07 10:32:30 UTC

[jira] [Commented] (TIKA-381) HtmlParser should strip linefeeds out of links

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

Jukka Zitting commented on TIKA-381:
------------------------------------

The relevant TagSoup scanner state transitions are shown below:

{code}
S_QUOT, ' ', A_SP, S_QUOT,
S_QUOT, '\n', A_SP, S_QUOT,
S_QUOT, '\t', A_SP, S_QUOT,
{code}

Which, as you mention, transforms all linefeeds (and other whitespace like tabs) to spaces. Changing the A_SP action to A_SAVE should fix that, but I didn't yet look into how easy it would be to customize TagSoup like that.
                
> 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: 0.6
>            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 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