From 0c9a9cccd29cb21aeeff728795cd18e3dfc42724 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 5 Jan 2012 11:04:55 +0000 Subject: [PATCH] google search module: decode HTML entities in result titles --- PBot/VERSION.pm | 4 ++-- modules/g.pl | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index a8d366e5..e9dd70c3 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 343, - BUILD_DATE => "2011-12-30", + BUILD_REVISION => 344, + BUILD_DATE => "2012-01-05", }; 1; diff --git a/modules/g.pl b/modules/g.pl index 8ef4d486..0ff88be6 100755 --- a/modules/g.pl +++ b/modules/g.pl @@ -6,6 +6,7 @@ use warnings; use strict; use Google::Search; +use HTML::Entities; my ($nick, $arguments, $matches); @@ -37,7 +38,7 @@ if(not $search->first) { my $comma = ""; while( my $result = $search->next) { - print $comma, $result->titleNoFormatting, ": ", $result->uri; + print $comma, decode_entities $result->titleNoFormatting, ": ", $result->uri; $comma = " -- "; last if --$matches <= 0; }