src/xmlnode.c

changeset 14233
4f5fe687b21d
parent 14097
0c340861ab79
equal deleted inserted replaced
14232:331b5d0a2fd4 14233:4f5fe687b21d
33 #include <libxml/parser.h> 33 #include <libxml/parser.h>
34 #endif 34 #endif
35 #include <string.h> 35 #include <string.h>
36 #include <glib.h> 36 #include <glib.h>
37 37
38 #include "util.h"
38 #include "xmlnode.h" 39 #include "xmlnode.h"
39 40
40 #ifdef _WIN32 41 #ifdef _WIN32
41 # define NEWLINE_S "\r\n" 42 # define NEWLINE_S "\r\n"
42 #else 43 #else
404 for(i=0; i < nb_attributes * 5; i+=5) { 405 for(i=0; i < nb_attributes * 5; i+=5) {
405 int attrib_len = attributes[i+4] - attributes[i+3]; 406 int attrib_len = attributes[i+4] - attributes[i+3];
406 char *attrib = g_malloc(attrib_len + 1); 407 char *attrib = g_malloc(attrib_len + 1);
407 memcpy(attrib, attributes[i+3], attrib_len); 408 memcpy(attrib, attributes[i+3], attrib_len);
408 attrib[attrib_len] = '\0'; 409 attrib[attrib_len] = '\0';
410 #ifdef HAVE_LIBXML
411 char *txt = attrib;
412 attrib = gaim_unescape_html(txt);
413 g_free(txt);
414 #endif
409 xmlnode_set_attrib(node, attributes[i], attrib); 415 xmlnode_set_attrib(node, attributes[i], attrib);
410 g_free(attrib); 416 g_free(attrib);
411 } 417 }
412 418
413 xpd->current = node; 419 xpd->current = node;

mercurial