[minor] Handle string with no html tag in xlsxutils (#3332)
This commit is contained in:
parent
0eb16baf82
commit
f16854559d
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue