openstreetmap-website/config/initializers/router.rb
2024-05-28 17:39:33 +01:00

14 lines
369 B
Ruby

# Some versions of ruby seem to accidentally force the encoding
# as part of normalize_path and some don't
module OpenStreetMap
module Router
module ForceEncoding
def normalize_path(path)
super.force_encoding("UTF-8")
end
end
end
end
ActionDispatch::Journey::Router::Utils.singleton_class.prepend(OpenStreetMap::Router::ForceEncoding)