Project

General

Profile

Feature #13943 ยป erb-unpack1.diff

znz (Kazuhiro NISHIYAMA), 09/27/2017 12:52 PM

View differences:

lib/erb.rb
994 994
    #
995 995
    def url_encode(s)
996 996
      s.to_s.b.gsub(/[^a-zA-Z0-9_\-.~]/n) { |m|
997
        sprintf("%%%02X", m.unpack("C")[0])
997
        sprintf("%%%02X", m.unpack1("C"))
998 998
      }
999 999
    end
1000 1000
    alias u url_encode