Skip to content

What's the deference between encodeURI and encodeURLComponent? #32

@Calerme

Description

@Calerme

encodeURL 用于对整个 URI 进行编码,其中功能字符如 ?, &, /, = 不会被转义。

encodeURLComponent 会对将所有字符转化为合法 URI 字符,常用于手动拼接 URI 。

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