From 6b09c4d8184ec5fb204bdab947a4900b5ec8d651 Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Thu, 17 Mar 2011 13:28:12 -0600 Subject: [PATCH] Fixed a bug in LinkTitle that caused multi-line 's to display wrong. --- NEWS | 1 + doc/CHANGELOG | 2 ++ modules/LinkTitle.pm | 3 +++ 3 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 8f9de2e..dd46c65 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,7 @@ Bug fixes: * Fixed an issue in auto --help that incorrectly displayed the binary name. * Fixed an exploit in QDB that allowed users to use services fantasy commands with the bot's account. +* Fixed a bug in LinkTitle that caused multi-line <title>'s to display wrong. Incompatibilities: diff --git a/doc/CHANGELOG b/doc/CHANGELOG index f0c15f9..b3a595e 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,8 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev =============================================================================== + * Fixed a bug in LinkTitle that caused multi-line <title>'s to display + wrong. * Added `wizard`, for creating local Auto config directories. * Made Auto respond properly to PRIVMSGs received before connection. * Added an AUR module. diff --git a/modules/LinkTitle.pm b/modules/LinkTitle.pm index 3c01353..285ff18 100644 --- a/modules/LinkTitle.pm +++ b/modules/LinkTitle.pm @@ -50,6 +50,9 @@ sub gettitle if ($res->is_success) { # We were, decode the data. my $data = $res->decoded_content; + + # Strip newlines. + $data =~ s/(\n|\r)//gxsm; # Check for <title> if ($data =~ m{<title>(.*)}ixsm) {