mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
GMarkup: clear attributes on ignorned tags
Make sure that if we ignore a tag then we also clear the attributes that we already collected so that they don't end up on the next unignored tag opening. Also add some extra brackets for clarity (it doesn't make any difference -- I just think it reads nicer this way). https://bugzilla.gnome.org/show_bug.cgi?id=665634
This commit is contained in:
parent
425f307b01
commit
daff84e23c
@ -1016,10 +1016,11 @@ emit_start_element (GMarkupParseContext *context,
|
||||
*
|
||||
* We deal with the end of the subparser from emit_end_element.
|
||||
*/
|
||||
if (context->flags & G_MARKUP_IGNORE_QUALIFIED && strchr (current_element (context), ':'))
|
||||
if ((context->flags & G_MARKUP_IGNORE_QUALIFIED) && strchr (current_element (context), ':'))
|
||||
{
|
||||
static const GMarkupParser ignore_parser;
|
||||
g_markup_parse_context_push (context, &ignore_parser, NULL);
|
||||
clear_attributes (context);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1070,7 +1071,7 @@ emit_end_element (GMarkupParseContext *context,
|
||||
possibly_finish_subparser (context);
|
||||
|
||||
/* We might have just returned from our ignore subparser */
|
||||
if (context->flags & G_MARKUP_IGNORE_QUALIFIED && strchr (current_element (context), ':'))
|
||||
if ((context->flags & G_MARKUP_IGNORE_QUALIFIED) && strchr (current_element (context), ':'))
|
||||
{
|
||||
g_markup_parse_context_pop (context);
|
||||
pop_tag (context);
|
||||
|
Loading…
Reference in New Issue
Block a user