mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
修复text为None时format_html()函数出错的bug
This commit is contained in:
parent
cad7d62eb0
commit
0462e9f2b3
@ -184,7 +184,7 @@ def _make_search_str(search_str: str) -> str:
|
||||
|
||||
|
||||
def format_html(text: str) -> str:
|
||||
return unescape(text).replace('\xa0', ' ')
|
||||
return unescape(text).replace('\xa0', ' ') if text else text
|
||||
|
||||
|
||||
def translate_loc(loc: tuple) -> tuple:
|
||||
|
Loading…
x
Reference in New Issue
Block a user