From c80f46277ca8044c28da8da88335f654593fd225 Mon Sep 17 00:00:00 2001 From: Matti Varjokallio Date: Thu, 29 Nov 2012 16:50:49 +0200 Subject: Removed extra slashes so the local file paths work in Windows. --- wkhtmltopdf/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py index 0111736..9907f93 100644 --- a/wkhtmltopdf/utils.py +++ b/wkhtmltopdf/utils.py @@ -6,6 +6,7 @@ from itertools import chain import os import sys import urllib +from urlparse import urljoin from django.conf import settings @@ -119,4 +120,4 @@ def http_quote(string): def pathname2fileurl(pathname): """Returns a file:// URL for pathname. Handles OS-specific conversions.""" - return 'file://' + urllib.pathname2url(pathname) + return urljoin('file:', urllib.pathname2url(pathname)) -- cgit v1.2.3