From e5a9142384644b93030f17532d6515711db9d7b1 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sun, 3 Jun 2012 21:17:25 +0100 Subject: [PATCH] read title even when over multiple lines --- modules/link.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/link.js b/modules/link.js index 82df1c4..dacb36a 100644 --- a/modules/link.js +++ b/modules/link.js @@ -20,6 +20,7 @@ var link = function(dbot) { request(link, function (error, response, body) { if(!error && response.statusCode == 200) { + body = body.replace(/(\r\n|\n\r|\n)/gm, " "); var title = body.valMatch(/(.*)<\/title>/, 2); if(title) { event.reply(title[1]);