g_markup_printf_escaped (
  const char* format,


Formats arguments according to format, escaping all string and character arguments in the fashion of g_markup_escape_text(). This is useful when you want to insert literal strings into XML-style markup output, without having to worry that the strings might themselves contain markup.

const char *store = "Fortnum & Mason";
const char *item = "Tea";
char *output;

output = g_markup_printf_escaped ("<purchase>"
                                  store, item);
Available since:2.4
This function is not directly available to language bindings


format const char*

Printf() style format string.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.

The arguments to insert in the format string.

Return value

Returns: gchar*

Newly allocated result from formatting operation. Free with g_free().

 The caller of the function takes ownership of the data, and is responsible for freeing it.
 The value is a NUL terminated UTF-8 string.