]> Cypherpunks repositories - gostls13.git/commitdiff
net/url: fix PathUnescape, QueryUnescape number grammar
authorRuss Cox <rsc@golang.org>
Wed, 6 Dec 2017 01:40:26 +0000 (20:40 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 6 Dec 2017 03:58:57 +0000 (03:58 +0000)
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>
src/net/url/url.go

index b2de6d63194d9519450c134dae2a3692001024b5..7c3d24493e0960d2b7072db37d773f149287e81a 100644 (file)
@@ -164,7 +164,7 @@ func shouldEscape(c byte, mode encoding) bool {
 }
 
 // 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).
 // It returns an error if any % is not followed by two hexadecimal
 // digits.
@@ -173,7 +173,7 @@ func QueryUnescape(s string) (string, error) {
 }
 
 // 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).
 // It returns an error if any % is not followed by two hexadecimal
 // digits.