Commit 8945f3a0 authored by Arnaud Fontaine's avatar Arnaud Fontaine

wkhtmltopdf: Also support 'htm' as source_format ('text/html' mimetype maps to...

wkhtmltopdf: Also support 'htm' as source_format ('text/html' mimetype maps to both 'htm' and 'html' extensions).
parent e8ad8298
......@@ -35,6 +35,7 @@ class TestServer(TestCase):
return [
(join('data', 'test_with_png_dataurl.html'), "html", "pdf", "application/pdf"),
(join('data', 'test_with_script.html'), "html", "pdf", "application/pdf"),
(join('data', 'test_with_script.html'), "htm", "pdf", "application/pdf"),
]
def testConvertHtmltoPdf(self):
......
......@@ -123,7 +123,7 @@ class Manager(object):
# use the conversion_kw in a possible interoperable way between all
# "html to pdf" handlers.
if (conversion_kw and
source_format == "html" and
source_format in ("htm", "html") and
destination_format == "pdf"):
handler_class = WkhtmltopdfHandler
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment