Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mustermann-contrib/lib/mustermann/file_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def f
# Unescape an URI escaped string.
# @!visibility private
def unescape(string)
@uri ||= URI::Parser.new
@uri ||= URI::RFC2396_Parser.new
@uri.unescape(string)
end

Expand Down
2 changes: 1 addition & 1 deletion mustermann-contrib/lib/mustermann/simple.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def compile(greedy: true, uri_decode: true, space_matches_plus: true, **options)

def encoded(char, uri_decode, space_matches_plus)
return Regexp.escape(char) unless uri_decode
parser = URI::Parser.new
parser = URI::RFC2396_Parser.new
encoded = Regexp.union(parser.escape(char), parser.escape(char, /./).downcase, parser.escape(char, /./).upcase)
encoded = Regexp.union(encoded, encoded('+', true, true)) if space_matches_plus and char == " "
encoded
Expand Down
Loading