(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)
(Reporting in case it is helpful.)
The following input causes
Parseto panic:(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)