[Tkabber-dev] r1934 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Apr 30 12:21:19 MSD 2010


Author: sergei
Date: 2010-04-30 12:21:19 +0400 (Fri, 30 Apr 2010)
New Revision: 1934

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/default.tcl
Log:
	* default.tcl: Fixed DDE command argument (thanks to Jan Zachorowski)
	  and ensured that URL doesn't contain spaces, so it can be used
	  without turning into a list.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2010-04-27 23:03:27 UTC (rev 1933)
+++ trunk/tkabber/ChangeLog	2010-04-30 08:21:19 UTC (rev 1934)
@@ -1,3 +1,9 @@
+2010-04-30  Sergei Golovan  <sgolovan at nes.ru>
+
+	* default.tcl: Fixed DDE command argument (thanks to Jan Zachorowski)
+	  and ensured that URL doesn't contain spaces, so it can be used
+	  without turning into a list.
+
 2010-04-28 Konstantin Khomoutov <flatworm at users.sourceforge.net>
 
 	* privacy.tcl: Fix creating new privacy list.

Modified: trunk/tkabber/default.tcl
===================================================================
--- trunk/tkabber/default.tcl	2010-04-27 23:03:27 UTC (rev 1933)
+++ trunk/tkabber/default.tcl	2010-04-30 08:21:19 UTC (rev 1934)
@@ -25,10 +25,12 @@
     set_status $url
     update
 
+    set url [string map {\u0020 %20 \u0009 %09 \u000d %0d \u000a %0a} $url]
+    
     if {[info exists ::webbrowser] && \
 	    $::webbrowser != ""} {
 	# If user specified a browser, use it
-	eval exec [format $::webbrowser [list $url]] &
+	eval exec [format $::webbrowser $url] &
 	return
     }
 
@@ -46,7 +48,7 @@
             set handled 0
             foreach app {Opera Firefox {Mozilla Firebird} Mozilla Netscape IExplore} {
                 if {[set srv [dde services $app WWW_OpenURL]] != {}} {
-                    if {[catch {dde request $app WWW_OpenURL $url} msg]} {
+                    if {[catch {dde request $app WWW_OpenURL $url,} msg]} {
                         debugmsg browseurl "dde request $app failed: \"$msg\""
                     } else {
                         set handled 1
@@ -104,7 +106,7 @@
                 }
             }
 
-            if {[catch { eval exec $env(BROWSER) -remote \"openURL($url, new-tab)\" }]} {
+            if {[catch { exec $env(BROWSER) -remote openURL($url,new-tab) }]} {
 		if {[catch { exec $env(BROWSER) -remote $url }]} {
 		    exec $env(BROWSER) $url &
 		}



More information about the Tkabber-dev mailing list