remy / inliner

Node utility to inline images, CSS and JavaScript for a web page - useful for mobile sites
MIT License
1.1k stars 165 forks source link

Support relative <img src=> URLs. #36

Closed jorendorff closed 10 years ago

jorendorff commented 10 years ago

img.src is an absolute URL. jsdom's img.src getter produces this URL by resolving the <img src=> attribute value relative to the document's URL—which is bogus unless we explicitly pass a correct URL to jsdom.env() to start with.

(With this change, inliner works on http://people.mozilla.org/~jorendorff/es6-draft.html.)