mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
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:
parent
8da9bc265b
commit
b870ad079d
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user