From: Ralf Ertzinger Date: Wed, 3 Aug 2011 21:10:58 +0000 (+0200) Subject: Base: Add decode_hexurl function X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=commitdiff_plain;h=03a8d4e683966fbd7228d4168dc68c2841970f23 Base: Add decode_hexurl function --- diff --git a/videosite/Base.pm b/videosite/Base.pm index 55a15e6..577eb52 100644 --- a/videosite/Base.pm +++ b/videosite/Base.pm @@ -178,4 +178,13 @@ sub ua { return LWP::UserAgent->new('agent' => 'Mozilla/5.0', 'cookie_jar' => HTTP::Cookies->new); } +sub decode_hexurl { + my $self = shift; + my $d = shift; + + $d =~ s/%([[:xdigit:]]{2})/chr(hex($1))/ge; + + return $d; +} + 1;