mirror of
https://github.com/golang/go
synced 2024-09-30 10:28:33 -06:00
net/url: fix PathUnescape, QueryUnescape number grammar
They do not convert a plural into a singular. (Introduced recently, in CL 77050.) Change-Id: I3b6c4d03b1866d4133e90b8ab05e8d4bfbd55125 Reviewed-on: https://go-review.googlesource.com/82078 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
bb22a697ab
commit
358d7c93e2
@ -164,7 +164,7 @@ func shouldEscape(c byte, mode encoding) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// QueryUnescape does the inverse transformation of QueryEscape,
|
// QueryUnescape does the inverse transformation of QueryEscape,
|
||||||
// converting 3-byte encoded substrings of the form "%AB" into the
|
// converting each 3-byte encoded substring of the form "%AB" into the
|
||||||
// hex-decoded byte 0xAB. It also converts '+' into ' ' (space).
|
// hex-decoded byte 0xAB. It also converts '+' into ' ' (space).
|
||||||
// It returns an error if any % is not followed by two hexadecimal
|
// It returns an error if any % is not followed by two hexadecimal
|
||||||
// digits.
|
// digits.
|
||||||
@ -173,7 +173,7 @@ func QueryUnescape(s string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PathUnescape does the inverse transformation of PathEscape,
|
// PathUnescape does the inverse transformation of PathEscape,
|
||||||
// converting 3-byte encoded substrings of the form "%AB" into the
|
// converting each 3-byte encoded substring of the form "%AB" into the
|
||||||
// hex-decoded byte 0xAB. It also converts '+' into ' ' (space).
|
// hex-decoded byte 0xAB. It also converts '+' into ' ' (space).
|
||||||
// It returns an error if any % is not followed by two hexadecimal
|
// It returns an error if any % is not followed by two hexadecimal
|
||||||
// digits.
|
// digits.
|
||||||
|
Loading…
Reference in New Issue
Block a user