diff --git a/lib/postrank-uri.rb b/lib/postrank-uri.rb index ab845b0..7b55f1b 100644 --- a/lib/postrank-uri.rb +++ b/lib/postrank-uri.rb @@ -133,7 +133,7 @@ def unescape(uri) u = parse(uri) u.query = u.query.tr('+', ' ') if u.query u.to_s.gsub(URIREGEX[:unescape]) do |encoded| - if encoded.match? URIREGEX[:reserved_characters] + if !encoded.match(URIREGEX[:reserved_characters]).nil? encoded else [encoded.delete('%')].pack('H*')