浏览代码

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

version-14
Faris Ansari 8 年前
committed by Nabin Hait
父节点
当前提交
f16854559d
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. +6
    -0
      frappe/utils/xlsxutils.py

+ 6
- 0
frappe/utils/xlsxutils.py 查看文件

@@ -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()


正在加载...
取消
保存