Parse html to text in export_query (#32794)

* fix: Parse html to text in export_query

* chore: Use xlsx data for csv content
This commit is contained in:
Niraj Gautam 2025-07-23 18:19:52 +05:30 committed by GitHub
parent 3efc476da9
commit aca2801897
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -356,7 +356,12 @@ def export_query():
)
if file_format_type == "CSV":
content = get_csv_bytes(xlsx_data, csv_params)
from frappe.utils.xlsxutils import handle_html
content = get_csv_bytes(
[[handle_html(frappe.as_unicode(v)) if isinstance(v, str) else v for v in r] for r in xlsx_data],
csv_params,
)
file_extension = "csv"
elif file_format_type == "Excel":
from frappe.utils.xlsxutils import make_xlsx