Skip to content

__WinHttpURLEncode, "[", "]", "%", and " " do not appear to get encoded #19

@rcmaehl

Description

@rcmaehl

Was looking into using this UDF in one of my current applications.

Looking into __WinHttpURLEncode it appears that "[", "]", "%", and " " do not get encoded

Return StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringReplace(StringTrimLeft(_WinHttpCreateUrl($aURLArray), 7), "!", "%21", 0, 1), "#", "%23", 0, 1), "$", "%24", 0, 1), "&", "%26", 0, 1), "'", "%27", 0, 1), "(", "%28", 0, 1), ")", "%29", 0, 1), "*", "%2A", 0, 1), "+", "%2B", 0, 1), ",", "%2C", 0, 1), "/", "%2F", 0, 1), ":", "%3A", 0, 1), ";", "%3B", 0, 1), "=", "%3D", 0, 1), "?", "%3F", 0, 1), "@", "%40", 0, 1)

This violates RFC 3986, Section 2.2. I can make a pull request if needed.

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