class Addressable::URI
bug fix the addressable/uri has a bug that is not escaping the '
Public Class Methods
escape2(str)
click to toggle source
# File lib/kamishibai/patches.rb, line 12 def self.escape2(str) s = Addressable::URI.escape(str) s = s.gsub("#",'%23') s = s.gsub("'",'%27') s = s.gsub('+','%2B') s end
unescape2(str)
click to toggle source
# File lib/kamishibai/patches.rb, line 22 def self.unescape2(str) s = str.gsub('%2B','+') s = s.gsub('%27',"'") s = s.gsub('%23',"#") s = Addressable::URI.unescape(s) s end