Quote tags as attributes

We need to quote the tick char (') on tags as this is used as XML
attribute.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2015-02-17 19:28:00 +02:00 committed by Dirk Hohndel
parent 598d5866c2
commit acff84a58d

View file

@ -315,7 +315,7 @@ static void save_tags(struct membuffer *b, struct tag_entry *entry)
struct divetag *tag = entry->tag;
put_string(b, sep);
/* If the tag has been translated, write the source to the xml file */
quote(b, tag->source ?: tag->name, 0);
quote(b, tag->source ?: tag->name, 1);
sep = ", ";
} while ((entry = entry->next) != NULL);
put_string(b, "'");