You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is surperising to me, because I expect that the URL constructor either fail or return a valid url; however, '/%n' is not a valid url. If you feed '/%n' to decodeURI(), it will throw a URIError.
The spec just say that a percent that is not a part of a percent-encoded byte is a "syntax violation", but does not require the parser to throw or to fix the syntax.
I suggest encode percent(%)s that are not part of a percent-encoded byte when parsing a URL, i.e. '/%n' becomes '/%25n' after parsing.
The text was updated successfully, but these errors were encountered:
Test case:
This is surperising to me, because I expect that the URL constructor either fail or return a valid url; however, '/%n' is not a valid url. If you feed '/%n' to
decodeURI()
, it will throw aURIError
.The spec just say that a percent that is not a part of a percent-encoded byte is a "syntax violation", but does not require the parser to throw or to fix the syntax.
I suggest encode percent(%)s that are not part of a percent-encoded byte when parsing a URL, i.e. '/%n' becomes '/%25n' after parsing.
The text was updated successfully, but these errors were encountered: