We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 195878e commit 44e98d0Copy full SHA for 44e98d0
1 file changed
tilepack/tms_utils.py
@@ -8,6 +8,7 @@
8
from collections.abc import Iterable
9
from dataclasses import dataclass, field
10
from pathlib import Path
11
+from xml.sax.saxutils import escape
12
13
PNG_SIGNATURE = b"\x89PNG\r\n\x1a\n"
14
EXT_RE = re.compile(r"\.(png|jpg|jpeg|webp)$", re.IGNORECASE)
@@ -206,7 +207,7 @@ def generate_tilemapresource_xml(
206
207
208
return f"""<?xml version="1.0" encoding="UTF-8"?>
209
<TileMap version="1.0.0" tilemapservice="1.0.0">
- <Title>{title}</Title>
210
+ <Title>{escape(title)}</Title>
211
<Abstract/>
212
<SRS>{srs}</SRS>
213
<BoundingBox minx="{bb_minx:.10f}" miny="{bb_miny:.10f}" maxx="{bb_maxx:.10f}" maxy="{bb_maxy:.10f}"/>
0 commit comments