aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf
diff options
context:
space:
mode:
authorJoseph <powderflask@gmail.com>2015-07-16 23:44:55 -0700
committerJoseph <powderflask@gmail.com>2015-07-16 23:44:55 -0700
commited9881478d064e55679a2eb684c29baf1939776c (patch)
tree7ec1ac008c357c8044ad1085a792ee0042f4bf56 /wkhtmltopdf
parente354459621f417195a96ca87ccf4ac42ef844aa4 (diff)
downloaddjango-wkhtmltopdf-ed9881478d064e55679a2eb684c29baf1939776c.tar.gz
django-wkhtmltopdf-ed9881478d064e55679a2eb684c29baf1939776c.tar.bz2
django-wkhtmltopdf-ed9881478d064e55679a2eb684c29baf1939776c.zip
Skip absolute path substitution where STATIC or MEDIA URL is not set
STATIC_URL or MEDIA_URL settings default to '' and None These default values cause the url match and replace algorithm to insert the *_ROOT setting in EVERY quoted string!!
Diffstat (limited to 'wkhtmltopdf')
-rw-r--r--wkhtmltopdf/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py
index 603d29a..e841380 100644
--- a/wkhtmltopdf/utils.py
+++ b/wkhtmltopdf/utils.py
@@ -152,7 +152,7 @@ def make_absolute_paths(content):
has_scheme = re.compile(r'^[^:/]+://')
for x in overrides:
- if has_scheme.match(x['url']):
+ if not x['url'] or has_scheme.match(x['url']):
continue
if not x['root'].endswith('/'):