irssi-scripts: tinyurl.pl does not work, when the url contains a query string

Alexander Schier alexander_schier at yahoo.de
Tue Apr 4 14:57:50 UTC 2006


Package: irssi-scripts
Version: 20050609
Severity: normal
Tags: patch

tinyurl.pl cuts the querystring off.

-- System Information:
Debian Release: testing/unstable
  APT prefers dapper-updates
  APT policy: (500, 'dapper-updates'), (500, 'dapper-security'), (500, 'dapper')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-17-686
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages irssi-scripts depends on:
ii  irssi [irssi-text]       0.8.10-1ubuntu1 terminal based IRC client
ii  irssi-text               0.8.10-1ubuntu1 irssi dummy transition package

Versions of packages irssi-scripts recommends:
ii  libwww-perl                   5.803-4    WWW client/server library for Perl

-- no debconf information
-------------- next part --------------
--- tinyurl.pl.bak	2004-10-31 11:17:13.000000000 +0100
+++ tinyurl.pl	2006-04-04 16:53:13.000000000 +0200
@@ -5,6 +5,7 @@
 use strict;
 use IO::Socket;
 use LWP::UserAgent;
+use CGI;
 
 use vars qw($VERSION %IRSSI);
 
@@ -32,7 +33,8 @@
 );
 
 sub tinyurl {
-	my $url = shift;
+  my $query=new CGI;
+  my $url = $query->escape(shift);
   my $ua = LWP::UserAgent->new;
   $ua->agent("tinyurl for irssi/1.0 ");
   my $req = HTTP::Request->new(POST => 'http://tinyurl.com/create.php');


More information about the ubuntu-users mailing list