diff options
Diffstat (limited to 'wkhtmltopdf')
-rw-r--r-- | wkhtmltopdf/views.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wkhtmltopdf/views.py b/wkhtmltopdf/views.py index 6fe402f..ac406a3 100644 --- a/wkhtmltopdf/views.py +++ b/wkhtmltopdf/views.py @@ -79,7 +79,7 @@ class PDFTemplateResponse(TemplateResponse, PDFResponse): if not media_root.endswith('/'): media_root += '/' relative_path = settings.MEDIA_URL - for x in re.findall('''"({0}.*?)"'''.format(relative_path), content): + for x in re.findall('''["|']({0}.*?)["|']'''.format(relative_path), content): content = content.replace(x, pathname2fileurl(media_root) + x[len(relative_path):]) tempfile = NamedTemporaryFile(mode=mode, bufsize=bufsize, |