Author: Chris Warburton <chriswarbo@gmail.com>
Date: Mon May 21 04:00:22 PM UTC 2018
Parent: b9045bf253d957723afec38452257083919ab1b0
Log message:
Special-case file:// URLs
1: diff --git a/html-inliner b/html-inliner 2: index 2d7dda2..c7f2bc6 100755 3: --- a/html-inliner 4: +++ b/html-inliner 5: @@ -13,6 +13,8 @@ def fixup(url): 6: if '://' in url: return url 7: base = os.getenv('BASE_URL') 8: if base: 9: + if base.startswith('file://'): 10: + return base + '/' + url 11: return urlparse.urljoin(base, url) 12: sys.stderr.write( 13: 'Found non-absolute URL "{0}", but no BASE_URL given'.format(url))