hyper
hyper copied to clipboard
Invalid query strings cause exceptions
Hyper uses decodeURIComponent
to parse query string. However, decodeURIComponent
has an incorrect type as documented here, since it throws an exception on invalid input.
I'm unsure whether it would be better to wait for the related issue to be resolved or to use something else for decoding strings.
Yeah, maybe we should switch over to https://pursuit.purescript.org/packages/purescript-uri/4.0.0/docs/Data.URI.Query. I just skimmed it, but it seems to be the corresponding thing, but with a safe parser and type.
Thanks, I'll look into it.