Created
September 28, 2011 22:34
-
-
Save robcthegeek/1249437 to your computer and use it in GitHub Desktop.
So, URI.escape doesn't escape so well..
This file contains 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
module URI | |
# For Times Where URI.escape should *ACTUALLY* Escape! | |
def self.great_escape(s) | |
URI.escape(s, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]")) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment