Skip to content

A platform for community discussion. Free, open, simple.

FIX - rails_route_from_url would fail if path contained unicode characters

jbrwe1896f7e71bc
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