mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
gmarkup: Fix validation of element names
Previously, the element name validation only happened if a start_element callback was specified on the context. Element name validation should be unconditional. This was causing test-5.gmarkup to fail when run against the improved tests in the following commit. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
3a961236dd
commit
2187b1bec4
@ -1050,8 +1050,10 @@ emit_start_element (GMarkupParseContext *context,
|
||||
tmp_error = NULL;
|
||||
start_name = current_element (context);
|
||||
|
||||
if (context->parser->start_element &&
|
||||
name_validate (context, start_name, error))
|
||||
if (!name_validate (context, start_name, error))
|
||||
return;
|
||||
|
||||
if (context->parser->start_element)
|
||||
(* context->parser->start_element) (context,
|
||||
start_name,
|
||||
(const gchar **)attr_names,
|
||||
|
Loading…
Reference in New Issue
Block a user