mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 02:36:19 +01:00
Bug 521591 – g_markup_parse_context_parse() creates GError message that
2008-03-11 Murray Cumming <murrayc@murrayc.com> Bug 521591 – g_markup_parse_context_parse() creates GError message that is invalid UTF8. * glib/gmarkup.c (set_error): Make sure that the GError::message is valid UTF-8 even if it is complaining about invalid UTF-8 in the markup text, using _g_utf8_make_valid(). svn path=/trunk/; revision=6680
This commit is contained in:
parent
c5a10d2650
commit
0ae78c829d
@ -1,3 +1,12 @@
|
|||||||
|
2008-03-11 Murray Cumming <murrayc@murrayc.com>
|
||||||
|
|
||||||
|
Bug 521591 – g_markup_parse_context_parse() creates GError message that
|
||||||
|
is invalid UTF8.
|
||||||
|
|
||||||
|
* glib/gmarkup.c (set_error): Make sure that the GError::message is
|
||||||
|
valid UTF-8 even if it is complaining about invalid UTF-8 in the
|
||||||
|
markup text, using _g_utf8_make_valid().
|
||||||
|
|
||||||
2008-03-10 Matthias Clasen <mclasen@redhat.com>
|
2008-03-10 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* === Released 2.16.1 ===
|
* === Released 2.16.1 ===
|
||||||
|
@ -215,14 +215,20 @@ set_error (GMarkupParseContext *context,
|
|||||||
{
|
{
|
||||||
GError *tmp_error;
|
GError *tmp_error;
|
||||||
gchar *s;
|
gchar *s;
|
||||||
|
gchar *s_valid;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
va_start (args, format);
|
va_start (args, format);
|
||||||
s = g_strdup_vprintf (format, args);
|
s = g_strdup_vprintf (format, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
tmp_error = g_error_new_literal (G_MARKUP_ERROR, code, s);
|
/* Make sure that the GError message is valid UTF-8 even if it is
|
||||||
|
* complaining about invalid UTF-8 in the markup: */
|
||||||
|
s_valid = _g_utf8_make_valid (s);
|
||||||
|
tmp_error = g_error_new_literal (G_MARKUP_ERROR, code, s_valid);
|
||||||
|
|
||||||
g_free (s);
|
g_free (s);
|
||||||
|
g_free (s_valid);
|
||||||
|
|
||||||
g_prefix_error (&tmp_error,
|
g_prefix_error (&tmp_error,
|
||||||
_("Error on line %d char %d: "),
|
_("Error on line %d char %d: "),
|
||||||
|
Loading…
Reference in New Issue
Block a user