diff options
Diffstat (limited to 'lib/uri')
-rw-r--r-- | lib/uri/common.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 6378541cbe..00051a88fa 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -379,7 +379,7 @@ module URI # # See URI.encode_www_form_component, URI.decode_www_form def self.decode_www_form_component(str, enc=Encoding::UTF_8) - raise ArgumentError, "invalid %-encoding (#{str})" unless /\A[^%]*(?:%\h\h[^%]*)*\z/ =~ str + raise ArgumentError, "invalid %-encoding (#{str})" if /%(?!\h\h)/ =~ str str.b.gsub(/\+|%\h\h/, TBLDECWWWCOMP_).force_encoding(enc) end |