class Fog::Brightbox::Storage
Public Class Methods
escape(str, extra_exclude_chars = "")
click to toggle source
CGI.escape, but without special treatment on spaces
# File lib/fog/brightbox/storage.rb, line 217 def self.escape(str, extra_exclude_chars = "") str.gsub(/([^a-zA-Z0-9_.-#{extra_exclude_chars}]+)/) do "%" + Regexp.last_match[1].unpack("H2" * Regexp.last_match[1].bytesize).join("%").upcase end end