Permalink
Browse files

Fixes in webtitle once again (well, this is ugly)

  • Loading branch information...
1 parent 2a59177 commit dbcde36ee25d69fab648b5ee491ad337ef7c82c5 @tadzik committed May 30, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 a8bot/Plugin/WebTitle.pm
@@ -28,7 +28,9 @@ sub pubmsg {
$site = $site->decoded_content;
my ($title) = $site =~ /<title>([^<]+)<\/title>/i;
if ($title) {
- $title =~ s/\s/ /g;
+ $title =~ s/^\s+//g;
+ $title =~ s/\s+$//g;
+ $title =~ s/\s+/ /g;
return encode('utf-8', "[ $title ]");
}
} else {

0 comments on commit dbcde36

Please sign in to comment.