quote printf arguments so that we don't generate invalid XML by writing

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

	* tools/generate.c (xml_printf): quote printf arguments so that
	we don't generate invalid XML by writing unescaped double quotes
	and such in attributes

svn path=/trunk/; revision=715
This commit is contained in:
Tommi Komulainen 2008-10-15 22:07:57 +00:00 committed by Philip Withnall
parent 8da9bc265b
commit b870ad079d

View File

@ -65,9 +65,12 @@ static void
xml_printf (Xml *xml, const char *fmt, ...)
{
va_list ap;
char *s;
va_start (ap, fmt);
vfprintf (xml->file, fmt, ap);
s = g_markup_vprintf_escaped (fmt, ap);
fputs (s, xml->file);
g_free (s);
va_end (ap);
}