Skip to content

How to detect if a string is encoded with encodeURIComponent() #71

@openHacking

Description

@openHacking
function isEncoded(str) {
        return typeof str == "string" && decodeURIComponent(str) !== str;
}

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