diff --git a/lib/inline-css.js b/lib/inline-css.js index c942279..6c935bf 100644 --- a/lib/inline-css.js +++ b/lib/inline-css.js @@ -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'); diff --git a/lib/inline-img.js b/lib/inline-img.js index a12df5d..c7efc97 100644 --- a/lib/inline-img.js +++ b/lib/inline-img.js @@ -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')); }); diff --git a/lib/inline-link-less.js b/lib/inline-link-less.js index 2cca784..9711d9c 100644 --- a/lib/inline-link-less.js +++ b/lib/inline-link-less.js @@ -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')); diff --git a/test/fixtures/index.html b/test/fixtures/index.html index 2312e79..b967eaa 100644 --- a/test/fixtures/index.html +++ b/test/fixtures/index.html @@ -19,5 +19,7 @@
Style
Attribute
Image + {{> partial}} + {{helper}} \ No newline at end of file