aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-02 16:47:44 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-11-02 17:02:50 -0700
commit57083fea1a5e610c9fb0b0c723eff3f084577814 (patch)
tree8fa12cccf072e778c933ab202f537a2a2bbe6a24 /python/fatcat_tools
parent4bb25cec68f1b2613a906e416d4ee3abf9050f6d (diff)
downloadfatcat-57083fea1a5e610c9fb0b0c723eff3f084577814.tar.gz
fatcat-57083fea1a5e610c9fb0b0c723eff3f084577814.zip
ftfy 'fix_entities' argument has been renamed
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r--python/fatcat_tools/normal.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/fatcat_tools/normal.py b/python/fatcat_tools/normal.py
index e27754f5..eb61c326 100644
--- a/python/fatcat_tools/normal.py
+++ b/python/fatcat_tools/normal.py
@@ -6,7 +6,7 @@ free-form input, titles, etc.
import re
import base64
-from typing import Optional
+from typing import Optional, Union
import unicodedata
import ftfy
@@ -326,10 +326,10 @@ def clean_str(thing: Optional[str], force_xml: bool = False) -> Optional[str]:
"""
if not thing:
return None
- fix_entities = 'auto'
+ unescape_html: Union[str, bool] = 'auto'
if force_xml:
- fix_entities = True
- fixed = ftfy.fix_text(thing, fix_entities=fix_entities).strip()
+ unescape_html = True
+ fixed = ftfy.fix_text(thing, unescape_html=unescape_html).strip()
if not fixed or len(fixed) <= 1:
# wasn't zero-length before, but is now; return None
return None