Skip to content

Instantly share code, notes, and snippets.

@robcthegeek
Created September 28, 2011 22:34
Show Gist options
  • Save robcthegeek/1249437 to your computer and use it in GitHub Desktop.
Save robcthegeek/1249437 to your computer and use it in GitHub Desktop.
So, URI.escape doesn't escape so well..
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