UTF-8 で match させるようにする
# File lib/jpmobile/rack.rb, line 40 def escape(s) s.to_s.gsub(/([^ a-zA-Z0-9_.-]+)/) { '%'+$1.unpack('H2'*bytesize($1)).join('%').upcase }.tr(' ', '+') end
# File lib/jpmobile/rack.rb, line 46 def unescape(s) s.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/){ [$1.delete('%')].pack('H*') } end
[Validate]
Generated with the Darkfish Rdoc Generator 2.