Skip to content

URL containing a single quote in middle results in unexpected ending #5

Closed
@robinst

Description

@robinst

With the following input: http://example.org/"_(foo)

Currently the extracted link is this: http://example.org/"_(foo

The closing parenthesis is not included, even though it's balanced. The reason is that we check all "unfinished" brackets and quotes in one condition at the end of the loop instead of just when the corresponding character happened. So when we get to ), we're still in the "unfinished" state because of the single quote.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions