This commit is contained in:
reality 2015-02-04 18:52:35 +00:00
parent 11c303bcaa
commit e831a7cfa5

View File

@ -26,7 +26,7 @@ var link = function(dbot) {
size = 0,
page = request(link.replace('https', 'http'), function(error, response, body) {
if(!error && response.statusCode == 200) {
body = body.replace(/(\r\n|\n\r|\n)/gm, " ");
body = body.replace(/(\r\n|\n\r|\n)/gim, " ");
var title = body.valMatch(/<title>(.*?)<\/title>/, 2);
if(title && title.length < 140) {
callback(ent.decode(title[1]).trim());