[Tkabber-dev] r1403 - in trunk/tkabber: . plugins/general

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Apr 22 09:58:10 MSD 2008


Author: sergei
Date: 2008-04-22 09:58:08 +0400 (Tue, 22 Apr 2008)
New Revision: 1403

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/general/caps.tcl
Log:
	* plugins/general/caps.tcl: Fixed bug with jabber:x:data processing
	  in case if field values contain spaces.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-04-21 19:49:29 UTC (rev 1402)
+++ trunk/tkabber/ChangeLog	2008-04-22 05:58:08 UTC (rev 1403)
@@ -1,3 +1,8 @@
+2008-04-22  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/general/caps.tcl: Fixed bug with jabber:x:data processing
+	  in case if field values contain spaces.
+
 2008-04-21  Sergei Golovan  <sgolovan at nes.ru>
 
 	* datagathering.tcl: Added variable type to parsed jabber:x:data form

Modified: trunk/tkabber/plugins/general/caps.tcl
===================================================================
--- trunk/tkabber/plugins/general/caps.tcl	2008-04-21 19:49:29 UTC (rev 1402)
+++ trunk/tkabber/plugins/general/caps.tcl	2008-04-22 05:58:08 UTC (rev 1403)
@@ -50,11 +50,21 @@
 		    set form_type [encoding convertto utf-8 [lindex $values 0]]
 		}
 		default {
-		    lappend bineform [encoding convertto utf-8 [linsert $values 0 $var]]
+		    set binex {}
+		    foreach val $values {
+			lappend binex [encoding convertto utf-8 $val]
+		    }
+		    lappend bineform \
+			    [linsert [lsort -ascii $binex] 0 \
+				     [encoding convertto utf-8 $var]]
 		}
 	    }
 	}
-	lappend binextra [linsert [lsort -ascii -index 0 $bineform] 0 $form_type]
+	set bineform1 {}
+	foreach ex [lsort -ascii -index 0 $bineform] {
+	    lappend bineform1 [join $ex "<"]
+	}
+	lappend binextra [linsert $bineform1 0 $form_type]
     }
 
     set binextra1 {}



More information about the Tkabber-dev mailing list