Project

General

Profile

Backport #5149 ยป uri.patch

regularfry (Alex Young), 08/03/2011 01:15 AM

View differences:

common.rb 2011-08-02 17:08:21.000000000 +0100
775 775
      rescue
776 776
      end
777 777
    end
778
    raise ArgumentError, "invalid %-encoding (#{str})" unless /\A(?:%\h\h|[^%]+)*\z/ =~ str
778
    raise ArgumentError, "invalid %-encoding (#{str})" unless /\A(?:%\h\h|[^%])*\z/ =~ str
779 779
    str.gsub(/\+|%\h\h/, TBLDECWWWCOMP_).force_encoding(enc)
780 780
  end
781 781