2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-23 10:38:55 +00:00

Fix parsing of title including more than the title tag

- Fixes #195
This commit is contained in:
Goh Jia Hao 2016-05-26 18:16:02 +08:00
parent 1de9eec356
commit 5833347ad8

View File

@ -17,7 +17,7 @@ function inferTitle(url, callback) {
} }
const $ = cheerio.load(body); const $ = cheerio.load(body);
const pageTitle = $('title').text().replace(/\//g, ''); const pageTitle = $('title').first().text().replace(/\//g, '');
callback(null, pageTitle); callback(null, pageTitle);
}); });
} }