How to decode/unescape a url encoded string in Ruby
1 minsYou can use Ruby’s CGI::Unescape method to unescape or decode a URL encoded string. Let’s see an example of URL decoding in Ruby
URL decoding a string in Ruby
require 'cgi'
url_encoded_string = CGI.escape("Coder's Paradise@Ruby") # Coder%27s+Paradise%40Ruby
decoded_string = CGI.unescape(url_encoded_string) # Coder's Paradise@Ruby