diff --git a/frappe/utils/response.py b/frappe/utils/response.py index 886baf2c37..8169986e44 100644 --- a/frappe/utils/response.py +++ b/frappe/utils/response.py @@ -90,7 +90,7 @@ def as_json(): def as_pdf(): response = Response() response.mimetype = "application/pdf" - encoded_filename = quote(frappe.response['filename'].replace(' ', '_'), encoding='utf-8') + encoded_filename = quote(frappe.response['filename'].replace(' ', '_')) response.headers["Content-Disposition"] = ("filename=\"%s\"" % frappe.response['filename'].replace(' ', '_') + ";filename*=utf-8''%s" % encoded_filename).encode("utf-8") response.data = frappe.response['filecontent'] return response