fix: text editor fields exports HTML tags (#26571)

* fix: text editor fields exports HTML tags

* fix: use html2text to preserve text structure
This commit is contained in:
RitvikSardana 2024-05-27 18:26:00 +05:30 committed by GitHub
parent c05bc8292f
commit 394227a90f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,7 +118,6 @@ class Exporter:
for doc in data:
rows = []
rows = self.add_data_row(self.doctype, None, doc, rows, 0)
if table_fields:
# add child table data
for f in table_fields:
@ -144,6 +143,8 @@ class Exporter:
if df.fieldtype == "Duration":
value = format_duration(flt(value), df.hide_days)
if df.fieldtype == "Text Editor":
value = frappe.core.utils.html2text(value)
row[i] = value
return rows