Skip to content

Support partially URL-encoded paths #206

Closed as not planned
Closed as not planned

Description

@fregante

Activity

  1. fregante commented on Apr 5, 2026

    @fregante
    MemberAuthor

    @SunsetTechuila since you worked on something related recently (refined-github/refined-github#9138) do you think we need any work done for this here?

  2. SunsetTechuila commented on Apr 5, 2026

    @SunsetTechuila
    Contributor

    getRepo can normalize the path

    That would make sense, but it's unlikely to fix anything since I don't think anything is actually broken

  3. SunsetTechuila commented on Apr 5, 2026

    @SunsetTechuila
    Contributor

    We (almost?) never use file path or branch name from getRepo, and those are the only things that can be encoded

  4. SunsetTechuila commented on Apr 5, 2026

    @SunsetTechuila
    Contributor

    I think we also should update buildRepoUrl to encode each of pathParts

  5. SunsetTechuila commented on Apr 5, 2026

    @SunsetTechuila
    Contributor
  6. SunsetTechuila commented on Apr 5, 2026

    @SunsetTechuila
    Contributor
    Image Image
  7. fregante commented on Jul 11, 2026

    @fregante
    MemberAuthor

    After re-reviewing the examples and the PR, I don’t think this package should necessarily concern itself with parsing the URLs into standalone components, but instead keep URLs as URLs, including its components/parts when extracting the filePath, etc.

    Keeping URLs as URLs makes it easier for URL-in URL-out operations like GitHubFileURL, where you want to swap parts of the URL without having to go through encoding/decoding every time.

    The only parts where encoded URLs are a problem is when we pass the parts to API calls. I think we can address each of those cases individually as they're reported. Strangely, nobody ever reported them, which makes me think we should not spend time on this at this point.


    However, this issue as titled and described was about "incorrectly-encoded URLs" like the given example, not "all encoded URLs".

    In the end, going back to the original issue, it seems that Refined GitHub itself generated such URL and as such it was never an issue.

    Anyway, thanks for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions