aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormlen108 <matt.lenc@gmail.com>2012-11-13 17:20:45 +0000
committermlen108 <matt.lenc@gmail.com>2012-11-13 17:20:45 +0000
commit7399977bbc2d72a8b3a3aed2c2fedb7ab8451af3 (patch)
tree864e26453162b60872faded87b58e8e8b9fe14f8
parentd68d686208163adda4789609bb335982c5d480c4 (diff)
downloaddjango-wkhtmltopdf-7399977bbc2d72a8b3a3aed2c2fedb7ab8451af3.tar.gz
django-wkhtmltopdf-7399977bbc2d72a8b3a3aed2c2fedb7ab8451af3.tar.bz2
django-wkhtmltopdf-7399977bbc2d72a8b3a3aed2c2fedb7ab8451af3.zip
Match single/double quotes.
-rw-r--r--wkhtmltopdf/views.py2
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,