Changeset 327af51 for lib/xmltree.c


Ignore:
Timestamp:
2010-08-21T17:27:32Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
4022b68
Parents:
a366cca
Message:

Some general cleanup, plus fixing a bug in the memberlist parsing code:
the lists can come in in any order, so parse it *completely* before showing
auth requests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/xmltree.c

    ra366cca r327af51  
    338338        /* Print the attributes */
    339339        for( i = 0; node->attr[i].key; i ++ )
    340                 printf( " %s=\"%s\"", node->attr[i].key, g_markup_escape_text( node->attr[i].value, -1 ) );
     340        {
     341                char *v = g_markup_escape_text( node->attr[i].value, -1 );
     342                printf( " %s=\"%s\"", node->attr[i].key, v );
     343                g_free( v );
     344        }
    341345       
    342346        /* /> in case there's really *nothing* inside this tag, otherwise
     
    358362                for( i = 0; node->text[i] && isspace( node->text[i] ); i ++ );
    359363                if( node->text[i] )
    360                         printf( "%s", g_markup_escape_text( node->text, -1 ) );
     364                {
     365                        char *v = g_markup_escape_text( node->text, -1 );
     366                        printf( "%s", v );
     367                        g_free( v );
     368                }
    361369        }
    362370       
Note: See TracChangeset for help on using the changeset viewer.