Browse Source

[minor] Handle string with no html tag in xlsxutils (#3332)

version-14
Faris Ansari 8 years ago
committed by Nabin Hait
parent
commit
f16854559d
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      frappe/utils/xlsxutils.py

+ 6
- 0
frappe/utils/xlsxutils.py View File

@@ -37,6 +37,12 @@ def make_xlsx(data, sheet_name):


def handle_html(data):
# return if no html tags found
if '<' not in data:
return data
if '>' not in data:
return data

from html2text import unescape, HTML2Text

h = HTML2Text()


Loading…
Cancel
Save