summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-28 21:43:14 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-28 21:43:14 -0800
commit1059f22aae0b21d1991929973cb77780cfc2f1b7 (patch)
tree8be0d94a4a06c907d1806e1b8ace3dedfd39b9f5 /python/fatcat_tools/importers
parent0aae9644efa8da34e78b8d2b1bc12e185548ab45 (diff)
downloadfatcat-1059f22aae0b21d1991929973cb77780cfc2f1b7.tar.gz
fatcat-1059f22aae0b21d1991929973cb77780cfc2f1b7.zip
don't allow empty or single-character clean strings
Diffstat (limited to 'python/fatcat_tools/importers')
-rw-r--r--python/fatcat_tools/importers/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/fatcat_tools/importers/common.py b/python/fatcat_tools/importers/common.py
index a29b3019..d6d2e4e9 100644
--- a/python/fatcat_tools/importers/common.py
+++ b/python/fatcat_tools/importers/common.py
@@ -33,7 +33,7 @@ def clean(thing, force_xml=False):
if force_xml:
fix_entities = True
fixed = ftfy.fix_text(thing, fix_entities=fix_entities).strip()
- if not fixed:
+ if not fixed or len(fixed) <= 1:
# wasn't zero-length before, but is now; return None
return None
return fixed