[Pidgin] #8318: xml:lang not handled properly in XMPP parser

Pidgin trac at pidgin.im
Sun Feb 8 17:41:51 EST 2009


#8318: xml:lang not handled properly in XMPP parser
--------------------------+-------------------------------------------------
 Reporter:  warriant      |           Owner:  deryni
     Type:  defect        |          Status:  new   
Milestone:                |       Component:  XMPP  
  Version:  2.5.4         |      Resolution:        
 Keywords:  xmlnode_copy  |   Launchpad_bug:        
--------------------------+-------------------------------------------------

Comment(by QuLogic):

 The problem is in `jabber_parser_element_start_libxml` in this loop:
 {{{
 for(i=0; i < nb_attributes * 5; i+=5) {
         const char *prefix = (const char *)attributes[i + 1];
         ...
         xmlnode_set_attrib_with_namespace(node, (const char*)
 attributes[i], attrib_ns, attrib);
         if (prefix && *prefix) {
                 node->prefix = g_strdup(prefix);
         }
         ...
 }
 }}}

 That if-block sets the prefix on the node instead of on the attribute.
 Unfortunately, there does not appear to be a way to get the `xmlnode*`
 corresponding to an attribute. Perhaps we need a
 `xmlnode_set_attrib_with_namespace_and_prefix`, but that's a bit of a
 mouthful. :P

 On a side note, it appears that the xmlnode parser (the one behind
 `xmlnode_from_str`) ignores prefixes on attributes entirely.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/8318#comment:6>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list