Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid double-escaping in url_escape #30

Merged
merged 2 commits into from
Nov 30, 2023

Commits on Nov 5, 2023

  1. Avoid double-escaping in _url_escape.

    Because the escapes for other characters will put `%` into the output text, we need to perform replacements for `%` first. This ensures that all chars we replace this way were from the input text and not put there by some prior replacement step.
    
    The prior implementation would produce double-escaped values for the following characters:
    
    | Input char | Double-escaped | Fixed   |
    | ---------- | -------------- | ------- |
    | `" "`      | `"%2520"`      | `"%20"` |
    | `"!"`      | `"%2521"`      | `"%21"` |
    | `'"'`      | `"%2522"`      | `"%22"` |
    | `"#"`      | `"%2523"`      | `"%23"` |
    | `"$"`      | `"%2524"`      | `"%24"` |
    plobsing committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    f10cec7 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2023

  1. Configuration menu
    Copy the full SHA
    3c696d1 View commit details
    Browse the repository at this point in the history