Skip to content

Commit

Permalink
Merge pull request #46 from noraj/patch-1
Browse files Browse the repository at this point in the history
doc: fix method name
  • Loading branch information
olleolleolle authored Oct 14, 2023
2 parents 13369c3 + f8fb627 commit 39ec4d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cgi/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def unescape(string, encoding = @@accept_charset)

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

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

0 comments on commit 39ec4d0

Please sign in to comment.