/* Returns: a newly allocated string with the escaped text  */
gchar* g_markup_escape_text(const gchar *text, gssize length)
/* Returns: a newly allocated string with the escaped text  */
gchar* g_markup_escape_text(const gchar *text, gssize length)
{
  GString *str;
  g_return_val_if_fail (text != NULL, NULL);
  if (length < 0)
    length = strlen (text);
  str = g_string_sized_new (length);
  append_escaped_text (str, text, length);
  return g_string_free (str, FALSE);
}