From 1059f22aae0b21d1991929973cb77780cfc2f1b7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 28 Jan 2019 21:43:14 -0800 Subject: don't allow empty or single-character clean strings --- python/fatcat_tools/importers/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3