Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

URL escaping in cli app

  • Loading branch information...
commit ab9dcdac91fec0557773bfc9c4cf72004751abab 1 parent dac9028
@zaf authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 samples/speech-recog-cli.pl
View
4 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",
Please sign in to comment.
Something went wrong with that request. Please try again.