From e1896f7e71bca42e33a0e73b4c4c6561afd0b87a Mon Sep 17 00:00:00 2001 From: jbrw Date: Fri, 28 Aug 2020 15:10:10 -0400 Subject: [PATCH] FIX - rails_route_from_url would fail if path contained unicode characters --- lib/url_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/url_helper.rb b/lib/url_helper.rb index 38696f84be9..1915b78951d 100644 --- a/lib/url_helper.rb +++ b/lib/url_helper.rb @@ -68,7 +68,7 @@ class UrlHelper end def self.rails_route_from_url(url) - path = URI.parse(url).path + path = URI.parse(encode(url)).path Rails.application.routes.recognize_path(path) end