From bb0d422263539ba8e2d1c44534c5540da21083a2 Mon Sep 17 00:00:00 2001 From: lanxu Date: Wed, 2 Sep 2015 21:20:20 +0300 Subject: [PATCH] Fixed multiline titles --- plugins/getUrl.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/getUrl.js b/plugins/getUrl.js index 1097a79..8750cfd 100644 --- a/plugins/getUrl.js +++ b/plugins/getUrl.js @@ -33,7 +33,10 @@ module.exports = function(config) { var match = re.exec(data); if (match && match[2]) { - resolve(match[2].trim()); + var title = match[2].trim(); // remove whitespace + title = title.replace(/\r?\n|\r/g, ''); // remove newlines + + resolve(title); } else { reject(); }