switch (context->state){
case START:
- if (c == ' ' || c == '\t' || c == '\f' || c == '\n')
+ if (c == ' ' || c == '\t' || c == '\f' || c == '\n' || (c & 0x80))
continue;
if (c == '<'){
if (p+1 < end && p [1] == '?'){
if (context->parser.end_element != NULL && context->state == START_ELEMENT){
context->parser.end_element (context, ename, context->user_data, error);
if (error != NULL && *error != NULL){
- free (ename);
+ g_free (ename);
goto fail;
}
}
break;
case FLUSH_TEXT:
- if (context->parser.text != NULL){
+ if (context->parser.text != NULL && context->text != NULL){
context->parser.text (context, context->text->str, context->text->len,
context->user_data, error);
if (error != NULL && *error != NULL)