Sha256: c201a82c163259782c155db66126a83564137eea003b2c5549a111d587009d2c
Contents?: true
Size: 415 Bytes
Versions: 10
Compression:
Stored size: 415 Bytes
Contents
# TEMPORARY SOLUTION # Remove when Rack is fixed upstream module Rack module Utils def escape(s) regexp = case when RUBY_VERSION >= "1.9" && s.encoding === Encoding.find('UTF-8') /([^ a-zA-Z0-9_.-]+)/u else /([^ a-zA-Z0-9_.-]+)/n end s.to_s.gsub(regexp) { '%'+$1.unpack('H2'*bytesize($1)).join('%').upcase }.tr(' ', '+') end end end
Version data entries
10 entries across 10 versions & 1 rubygems