[Konversation-devel] [Bug 99354] Googling from the input box

ismail donmez ( cartman ) ismail at kde.org
Thu Jul 1 15:59:35 CEST 2010


https://bugs.kde.org/show_bug.cgi?id=99354





--- Comment #8 from ismail ( cartman ) donmez <ismail kde org>  2010-07-01 15:59:34 ---
commit e4d9fec745a67c67bf38fa0f195f85a62fa5b7f0
Author: İsmail Dönmez <ismail at kde.org>
Date:   Sun Feb 20 07:37:27 2005 +0000

    Use CGI::escape
    CCBUG:99354

    svn path=/trunk/kdeextragear-2/konversation/; revision=391162

diff --git a/scripts/google b/scripts/google
index 83a9837..9450259 100755
--- a/scripts/google
+++ b/scripts/google
@@ -4,6 +4,7 @@

 use warnings;
 use Getopt::Long;
+use CGI qw(:standard);

 my $PORT=shift;
 my $SERVER=shift;
@@ -50,16 +51,15 @@ else
     elsif($browser)
     {
     $query = join(" ", at ARGV);
-    $query =~ s/\&/\%26/g;
+    $query = CGI::escape($query);
     $url="http://www.google.com/search?q=$query";
     exec 'kfmclient','openURL',$url;
     }
     elsif($search || !$spellcheck)
     {
     $search = join(" ",$search, at ARGV);
-    
     system 'dcop', $PORT, 'Konversation', 'info',  "Searching Google for
\x02$search\x02 ...";
-    
+
     $googleSearch =
SOAP::Lite->service("http://api.google.com/GoogleSearch.wsdl"); 
     $result = $googleSearch->doGoogleSearch($key, $search, 0, 10, "false", "",
"false", "", "UTF-8", "UTF-8"); 

@@ -83,6 +83,7 @@ else
     elsif($spellcheck)
     {
     $spellcheck = join(" ",$spellcheck, at ARGV);
+
     system 'dcop', $PORT, 'Konversation', 'info', "Spellchecking
\x02$spellcheck\x02 ...";
     $googleSearch =
SOAP::Lite->service("http://api.google.com/GoogleSearch.wsdl"); 
     $spell = $googleSearch->doSpellingSuggestion($key, $spellcheck);

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Konversation-devel mailing list