3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-29 23:39:24 +01: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 # These are set automatically by the build/commit script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 343, BUILD_REVISION => 344,
BUILD_DATE => "2011-12-30", BUILD_DATE => "2012-01-05",
}; };
1; 1;

View File

@ -6,6 +6,7 @@ use warnings;
use strict; use strict;
use Google::Search; use Google::Search;
use HTML::Entities;
my ($nick, $arguments, $matches); my ($nick, $arguments, $matches);
@ -37,7 +38,7 @@ if(not $search->first) {
my $comma = ""; my $comma = "";
while( my $result = $search->next) { while( my $result = $search->next) {
print $comma, $result->titleNoFormatting, ": ", $result->uri; print $comma, decode_entities $result->titleNoFormatting, ": ", $result->uri;
$comma = " -- "; $comma = " -- ";
last if --$matches <= 0; last if --$matches <= 0;
} }