mirror of
https://github.com/KevinMidboe/inline-html.git
synced 2025-12-08 20:29:06 +00:00
Return decoded html.
This commit is contained in:
@@ -12,7 +12,7 @@ var unwrap = function (value) {
|
||||
return value.replace(regexp, '$1');
|
||||
};
|
||||
var inline = function (html, filePath) {
|
||||
var $ = cheerio.load(html);
|
||||
var $ = cheerio.load(html, {decodeEntities: false});
|
||||
|
||||
// style elements
|
||||
var styles = $('style');
|
||||
|
||||
@@ -5,7 +5,7 @@ var path = require('path');
|
||||
|
||||
var inline = function (html, filePath) {
|
||||
var basedir = path.dirname(filePath);
|
||||
var $ = cheerio.load(html);
|
||||
var $ = cheerio.load(html, {decodeEntities: false});
|
||||
var images = $('img').filter(function (index, element) {
|
||||
return isLocalPath($(element).attr('src'));
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ var inline = co.wrap(function * (html, filepath, options) {
|
||||
|
||||
// TODO Import less links
|
||||
// get links
|
||||
var $ = cheerio.load(html);
|
||||
var $ = cheerio.load(html, {decodeEntities: false});
|
||||
var links = $('link[rel="stylesheet/less"]')
|
||||
.filter(function (index, element) {
|
||||
return isLocalPath($(element).attr('href'));
|
||||
|
||||
Reference in New Issue
Block a user