Escape ampersands and angle brackets from track title in GPX.
This commit is contained in:
parent
52dbae2f41
commit
b84185ea4e
1 changed files with 2 additions and 1 deletions
|
@ -97,8 +97,9 @@ data class Track (
|
|||
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
|
||||
>
|
||||
""".trimIndent())
|
||||
val name_escaped = this.name.replace("&", "&").replace("<", "<").replace(">", ">")
|
||||
write("\t<metadata>")
|
||||
write("\t\t<name>${this.name}</name>")
|
||||
write("\t\t<name>${name_escaped}</name>")
|
||||
write("\t\t<application>${BuildConfig.APPLICATION_ID} ${BuildConfig.VERSION_NAME}</application>")
|
||||
write("\t\t<device>${this.device_id}</device>")
|
||||
write("\t</metadata>")
|
||||
|
|
Loading…
Reference in a new issue