-
Notifications
You must be signed in to change notification settings - Fork 11
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
Encode "+" as "%2B" since "+" is a valid SemVer character. #17
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -354,8 +354,8 @@ func TestEncoding(t *testing.T) { | |
}, | ||
{ | ||
name: "pre-encoded version is unchanged", | ||
input: "pkg:type/name/space/name@versio%20n?key=value#sub/path", | ||
expected: "pkg:type/name/space/name@versio%20n?key=value#sub/path", | ||
input: "pkg:type/name/space/name@versio%20n%2Bbeta?key=value#sub/path", | ||
expected: "pkg:type/name/space/name@versio%20n%2Bbeta?key=value#sub/path", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. before the fix in this PR, this test would fail as:
|
||
}, | ||
{ | ||
name: "unencoded qualifier value is encoded", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that
url.QueryEscape
will encode+
, but that method was replaced withPathEscape
in #1