mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
FIX - rails_route_from_url would fail if path contained unicode characters
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user