diff options
author | Joseph <powderflask@gmail.com> | 2015-07-16 23:44:55 -0700 |
---|---|---|
committer | Joseph <powderflask@gmail.com> | 2015-07-16 23:44:55 -0700 |
commit | ed9881478d064e55679a2eb684c29baf1939776c (patch) | |
tree | 7ec1ac008c357c8044ad1085a792ee0042f4bf56 /wkhtmltopdf | |
parent | e354459621f417195a96ca87ccf4ac42ef844aa4 (diff) | |
download | django-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.py | 2 |
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('/'): |