From a0991b62a34fc7d6a084dbc67739aba5ca3b6fd2 Mon Sep 17 00:00:00 2001 From: rehansari26 Date: Tue, 15 Apr 2025 17:52:21 +0530 Subject: [PATCH] fix: illegal characters in excel export --- frappe/utils/xlsxutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/xlsxutils.py b/frappe/utils/xlsxutils.py index 53b44bd5ca..155a5540b6 100644 --- a/frappe/utils/xlsxutils.py +++ b/frappe/utils/xlsxutils.py @@ -13,7 +13,7 @@ from openpyxl.workbook.child import INVALID_TITLE_REGEX import frappe from frappe.utils.html_utils import unescape_html -ILLEGAL_CHARACTERS_RE = re.compile(r"[\000-\010]|[\013-\014]|[\016-\037]") +ILLEGAL_CHARACTERS_RE = re.compile(r"[\000-\010]|[\013-\014]|[\016-\037]|\uFEFF|\uFFFE|\uFFFF|[\uD800-\uDFFF]") # return xlsx file object