Created
February 4, 2013 07:07
-
-
Save yuliabro/4705373 to your computer and use it in GitHub Desktop.
The Common Gateway Interface (CGI) is a simple protocol for passing an HTTP request from a web server to a standalone program, and returning the output to the web browser.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| => "x=twowords&y=twowords" | |
| >> q = "x=two+words&y=two%20words" | |
| => "x=two+words&y=two%20words" | |
| >> CGI.unescape(q) | |
| => "x=two words&y=two words" | |
| >> URI.unescape(q) | |
| => "x=two+words&y=two words" | |
| >> CGI.unescape(q).gsub(' ', '') | |
| => "x=twowords&y=twowords" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment