Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

CGI::Escape#escapeURIComponent

CGI.escapeURIComponent(string) → string

Returns URL-escaped string following RFC 3986.

See also #escapeHTML #unescape #escape #unescapeHTML also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2