mirror of
https://github.com/discourse/discourse.git
synced 2025-03-03 15:47:22 +08:00
FIX - rails_route_from_url would fail if path contained unicode characters
This commit is contained in:
parent
84dba3c1c7
commit
e1896f7e71
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user