[Pidgin] #14529: libpurple doesn't strip xml namespace prefixes from messages

Pidgin trac at pidgin.im
Wed Oct 12 12:14:35 EDT 2011

#14529: libpurple doesn't strip xml namespace prefixes from messages
 Reporter:  xnyhps  |        Owner:  darkrain42
     Type:  defect  |       Status:  closed    
Milestone:  3.0.0   |    Component:  XMPP      
  Version:  2.9.0   |   Resolution:  fixed     
 Keywords:          |  

Comment(by thijsalkemade at gmail.com):

 (In [b7a1ac61019d1553d175719453fb16d2e991cb80]):[[BR]]
 *** Plucked rev d9b2d73b4d6e64c7768adff67303cfa8816d6d2e
 (darkrain42 at pidgin.im):
 xmlnode: Fix some brokeness in xmlnode serialization with prefixed

 Basically we were treating node->xmlns as the default namespace, but
 that isn't the case with prefexed elements.  In our serialization,
 I believe we were adding an extraneous xmlns='' to a prefixed element,
 which changes the (default) namespace for its children.  (It's been
 a bit too long with this in my tree, so I've forgotten the exact details)

 *** Plucked rev 5cd85b37b438c361ff191199de99c6ba9b7b0e49
 (darkrain42 at pidgin.im):
 xmlnode: Add xmlnode_strip_prefixes

 This is largely based on a patch from Thijs (sphynx/xnyhps) Alkemade, with
 some modifications by me to try to maintain namespaces of elements
 as best as we can.

 I also rewrote xmlnode_get_default_namespace not to use recursion.

 References #14529

 *** Plucked rev f6804c803da32abd1dafe2a767e3c877a0521e1c
 (darkrain42 at pidgin.im):
 jabber: Strip element prefixes on XHTML-IM content.

 I'm a little late to the party in completing this code, as
 I believe Google's actually reverted the change.  But the consensus
 was we should present saner content to the core/UIs.

 Fixes #14529

Ticket URL: <http://developer.pidgin.im/ticket/14529#comment:10>
Pidgin <http://pidgin.im>

More information about the Tracker mailing list