aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fietsboek/util.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/fietsboek/util.py b/fietsboek/util.py
index 37e0943..0329a17 100644
--- a/fietsboek/util.py
+++ b/fietsboek/util.py
@@ -409,22 +409,6 @@ def tile_url(request: Request, route_name: str, **kwargs: str) -> str:
return route.replace("__x__", "{x}").replace("__y__", "{y}").replace("__z__", "{z}")
-def encode_gpx(gpx: gpxpy.gpx.GPX) -> bytes:
- """Encodes a GPX in-memory representation to the XML representation.
-
- This ensures that the resulting XML file is valid.
-
- Returns the contents of the XML as bytes, ready to be written to disk.
-
- :param gpx: The GPX file to encode. Might be modified!
- :return: The encoded GPX content.
- """
- for track in gpx.tracks:
- if track.link:
- track.link = html.escape(track.link)
- return gpx.to_xml().encode("utf-8")
-
-
def secure_filename(filename: str) -> str:
r"""Pass it a filename and it will return a secure version of it. This
filename can then safely be stored on a regular file system and passed
@@ -523,7 +507,6 @@ __all__ = [
"locale_display_name",
"list_locales",
"tile_url",
- "encode_gpx",
"secure_filename",
"recursive_size",
"xml_escape",