3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

google search module: decode HTML entities in result titles

This commit is contained in:
Pragmatic Software 2012-01-05 11:04:55 +00:00
parent cf0fead036
commit 0c9a9cccd2
2 changed files with 4 additions and 3 deletions

View File

@ -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;

View File

@ -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;
}