summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2022-08-16 12:43:36 +0200
committergit <svn-admin@ruby-lang.org>2023-11-07 10:22:30 +0000
commitced84beb2518d173988bb92c6d96aa854a35abe6 (patch)
tree63b7eb4254c4d391cf76d42318a9b2fd9e209843 /lib
parentf8ffe907f0ee7a4f60aeb165812c4045b5fddca4 (diff)
[ruby/cgi] Add snake case aliases for escapeURIComponent
As agreed in [Feature #18822] https://github.com/ruby/cgi/commit/9d1161ec9d
Diffstat (limited to 'lib')
-rw-r--r--lib/cgi/util.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/cgi/util.rb b/lib/cgi/util.rb
index 8b129a44a5..4986e544e0 100644
--- a/lib/cgi/util.rb
+++ b/lib/cgi/util.rb
@@ -46,6 +46,7 @@ module CGI::Util
end
buffer.force_encoding(encoding)
end
+ alias escape_uri_component escapeURIComponent
# URL-decode a string following RFC 3986 with encoding(optional).
# string = CGI.unescapeURIComponent("%27Stop%21%27+said%20Fred")
@@ -59,6 +60,8 @@ module CGI::Util
str.valid_encoding? ? str : str.force_encoding(string.encoding)
end
+ alias unescape_uri_component unescapeURIComponent
+
# The set of special characters and their escaped values
TABLE_FOR_ESCAPE_HTML__ = {
"'" => '&#39;',