Skip to content

Commit f8fb627

Browse files
authored
doc: fix method name
there was probably a copy paste mistake in the example of unescapeURIComponent (copied from unescape)
1 parent 13369c3 commit f8fb627

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cgi/util.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def unescape(string, encoding = @@accept_charset)
3636

3737
# URL-encode a string following RFC 3986
3838
# Space characters (+" "+) are encoded with (+"%20"+)
39-
# url_encoded_string = CGI.escape("'Stop!' said Fred")
39+
# url_encoded_string = CGI.escapeURIComponent("'Stop!' said Fred")
4040
# # => "%27Stop%21%27%20said%20Fred"
4141
def escapeURIComponent(string)
4242
encoding = string.encoding
@@ -48,7 +48,7 @@ def escapeURIComponent(string)
4848
end
4949

5050
# URL-decode a string following RFC 3986 with encoding(optional).
51-
# string = CGI.unescape("%27Stop%21%27+said%20Fred")
51+
# string = CGI.unescapeURIComponent("%27Stop%21%27+said%20Fred")
5252
# # => "'Stop!'+said Fred"
5353
def unescapeURIComponent(string, encoding = @@accept_charset)
5454
str = string.b

0 commit comments

Comments
 (0)