[PATCHv2 2/3] Escape all problematic characters when saving a tag

Maximilian Güntner maximilian.guentner at gmail.com
Thu Nov 14 16:39:01 UTC 2013


Signed-off-by: Maximilian Güntner <maximilian.guentner at gmail.com>
---
 save-xml.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/save-xml.c b/save-xml.c
index 5b0ef42..d16b16d 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -406,9 +406,9 @@ static void save_tags(FILE *f, struct tag_entry *tag_list)
 				fprintf(f, ", ");
 			/* If the tag has been translated, write the source to the xml file */
 			if (tmp->tag->source != NULL)
-				fprintf(f, "%s", tmp->tag->source);
+				quote(f, tmp->tag->source, 0);
 			else
-				fprintf(f, "%s", tmp->tag->name);
+				quote(f, tmp->tag->name, 0);
 			tmp = tmp->next;
 			more = 1;
 		}
-- 
1.8.4.2



More information about the subsurface mailing list