Permalink
Browse files

URL escaping in cli app

  • Loading branch information...
1 parent dac9028 commit ab9dcdac91fec0557773bfc9c4cf72004751abab @zaf committed May 31, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 samples/speech-recog-cli.pl
@@ -20,6 +20,7 @@
use strict;
use warnings;
+use URI::Escape;
use File::Temp qw(tempfile);
use Getopt::Std;
use File::Basename;
@@ -80,6 +81,9 @@
next;
}
+ $language = uri_escape($language);
+ $pro_filter = uri_escape($pro_filter);
+ $results = uri_escape($results);
my $response = $ua->post(
"$url?xjerr=1&client=chromium&lang=$language&pfilter=$pro_filter&maxresults=$results",
Content_Type => "audio/$filetype; rate=$samplerate",

0 comments on commit ab9dcda

Please sign in to comment.