comparison libgaim/protocols/jabber/parser.c @ 15204:f814b2df9cce

[gaim-migrate @ 17993] Blocking on Google Talk. Our Privacy API sucks so bad that even with no prior support for blocking in Jabber, this has no interface changes. If someone wanted to implement the deprecated Jabber privacy lists API, though, that would be ok by me. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Thu, 14 Dec 2006 04:56:54 +0000
parents 060594ebbef9
children
comparison
equal deleted inserted replaced
15203:b8ae75fa8d67 15204:f814b2df9cce
74 74
75 for(i=0; i < nb_attributes * 5; i+=5) { 75 for(i=0; i < nb_attributes * 5; i+=5) {
76 char *txt; 76 char *txt;
77 int attrib_len = attributes[i+4] - attributes[i+3]; 77 int attrib_len = attributes[i+4] - attributes[i+3];
78 char *attrib = g_malloc(attrib_len + 1); 78 char *attrib = g_malloc(attrib_len + 1);
79 char *attrib_ns = NULL;
80
81 if (attributes[i+2]) {
82 attrib_ns = g_strdup(attributes[i+2]);;
83 }
84
79 memcpy(attrib, attributes[i+3], attrib_len); 85 memcpy(attrib, attributes[i+3], attrib_len);
80 attrib[attrib_len] = '\0'; 86 attrib[attrib_len] = '\0';
87
81 txt = attrib; 88 txt = attrib;
82 attrib = gaim_unescape_html(txt); 89 attrib = gaim_unescape_html(txt);
83 g_free(txt); 90 g_free(txt);
84 xmlnode_set_attrib(node, (const char*) attributes[i], attrib); 91 xmlnode_set_attrib_with_namespace(node, (const char*) attributes[i], attrib_ns, attrib);
85 g_free(attrib); 92 g_free(attrib);
93 g_free(attrib_ns);
86 } 94 }
87 95
88 js->current = node; 96 js->current = node;
89 } 97 }
90 } 98 }