Return decoded html.

This commit is contained in:
Alexandre Gigliotti
2015-07-23 16:58:12 -07:00
parent d41b7b1616
commit dd4f03257c
4 changed files with 5 additions and 3 deletions

View File

@@ -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');

View File

@@ -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'));
});

View File

@@ -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'));

View File

@@ -19,5 +19,7 @@
<div id="style">Style</div>
<div id="attribute" style="background-image: url('./assets/person.png'); background-size: contain; background-repeat: no-repeat;">Attribute</div>
<img height="32px" width="32px" src="./assets/person.png"/>Image
{{> partial}}
{{helper}}
</body>
</html>