Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Parse panics on input without double quotes #6

Description

@dmitshur

(Reporting in case it is helpful.)

The following input causes Parse to panic:

link.Parse(`</example.png>;rel=preload;as=image`)

(Playground link: https://go.dev/play/p/yZcgx_-7G_4.)

The input comes from the real world and may or may not be valid. (From a quick look over RFC 5988, it seems that it might be okay.)

The panic can be minified to link.Parse("</example.png>; rel=preload"). It seems it happens when there aren't double quotes around the rel value.

I suspect PR #5 may fix it. (CC @AlaricWhitney)

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