lib/roda/plugins/unescape_path.rb in roda-3.61.0 vs lib/roda/plugins/unescape_path.rb in roda-3.62.0
- old
+ new
@@ -18,9 +18,16 @@
# # x => ['b', 'a']
# end
# end
module UnescapePath
module RequestMethods
+ # Make sure the matched path calculation handles the unescaping
+ # of the remaining path.
+ def matched_path
+ e = @env
+ Rack::Utils.unescape(e["SCRIPT_NAME"] + e["PATH_INFO"]).chomp(@remaining_path)
+ end
+
private
# Unescape the path.
def _remaining_path(env)
Rack::Utils.unescape(super)