Skip to content

'decodeURIComponent' fails to throw URIError for invalid UTF-8 sequences #1464

@ayuan0828

Description

@ayuan0828

Description

When decoding the invalid UTF-8 sequence %ED%BF%BF, decodeURIComponent outputs replacement characters ��� instead of throwing a URIError, violating ECMA-262 specifications.

Version

a29e8f5

Testcase

print(decodeURIComponent('%ED%BF%BF'));

Output

���

Expected output

Throw 'URIError'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions