From 8f4a42612b50bf4808016a3410fe9d4ef17f8c2d Mon Sep 17 00:00:00 2001 From: Slaven Rezic Date: Sat, 22 Feb 2020 16:52:41 +0100 Subject: [PATCH] uri escape query (RT #131926) --- Makefile.PL | 1 + Org.pm | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Makefile.PL b/Makefile.PL index b778081..283c758 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -12,6 +12,7 @@ WriteMakefile( 'PREREQ_PM' => { 'Carp::Heavy' => 0, 'IO::Socket::SSL' => 0, 'MIME::Base64' => 0, + 'URI::Escape' => 0, 'XML::Simple' => 0 } ); diff --git a/Org.pm b/Org.pm index 6a002b3..606487a 100644 --- a/Org.pm +++ b/Org.pm @@ -18,6 +18,7 @@ use IO::Socket::SSL; use MIME::Base64; use XML::Simple; use Encode; +use URI::Escape (); sub debug; @@ -102,6 +103,7 @@ sub translate { my $query = $term; $query =~ s/\s\s*/ /g; $query =~ s/\s/\+/g; + $query = URI::Escape::uri_escape_utf8($query); push @form, "search=$query"; # -- 2.1.4