Open Infrastructure Map, a view of infrastructure data in OpenStreetMap
URL escape country names in sitemap
Russ Garrett1ba14df6fd6a
diff --git a/sitemap.py b/sitemap.pyindex cd5b64c..7ff919d 100644--- a/sitemap.py+++ b/sitemap.py@@ -1,6 +1,7 @@import asgi_sitemapsfrom starlette.datastructures import URLfrom starlette.requests import Request+from urllib.parse import quotefrom data import get_countries@@ -21,7 +22,7 @@ class CountryPageSitemap(asgi_sitemaps.Sitemap):def location(self, item):request = Request(scope=self.scope)- url = request.url_for("country", country=item)+ url = request.url_for("country", country=quote(item))return URL(url).path