[Tkabber-dev] r1240 - in trunk/tkabber: . plugins/richtext

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Sep 25 22:58:31 MSD 2007


Author: sergei
Date: 2007-09-25 22:58:30 +0400 (Tue, 25 Sep 2007)
New Revision: 1240

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/richtext/emoticons.tcl
Log:
	* plugins/richtext/emoticons.tcl: Ignore empty text as an emoticon
	  label (thanks to Konstantin Khomoutov).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-09-23 19:11:58 UTC (rev 1239)
+++ trunk/tkabber/ChangeLog	2007-09-25 18:58:30 UTC (rev 1240)
@@ -1,3 +1,8 @@
+2007-09-25  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/richtext/emoticons.tcl: Ignore empty text as an emoticon
+	  label (thanks to Konstantin Khomoutov).
+
 2007-09-21  Sergei Golovan  <sgolovan at nes.ru>
 
 	* private.tcl, tkabber.tcl: Separated interface to private XML storage

Modified: trunk/tkabber/plugins/richtext/emoticons.tcl
===================================================================
--- trunk/tkabber/plugins/richtext/emoticons.tcl	2007-09-23 19:11:58 UTC (rev 1239)
+++ trunk/tkabber/plugins/richtext/emoticons.tcl	2007-09-25 18:58:30 UTC (rev 1240)
@@ -59,6 +59,10 @@
     variable images
     variable faces_regexp
 
+    if {$face == ""} {
+	return -code error "Empty emoticon mnemonic for image \"$image\""
+    }
+
     if {![info exists images($image)]} {
 	set images($image) 0
     }
@@ -228,6 +232,7 @@
 	jlib::wrapper:splitxml $item tag vars isempty chdata children
 	switch -- $tag {
 	    text {
+		if {$chdata == ""} continue ;# skip empty <text> element
 		lappend faces $chdata
 		if {$txtdefault == "" || \
 			[jlib::wrapper:getattr $vars default] == "true"} {



More information about the Tkabber-dev mailing list