diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-28 21:43:14 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-28 21:43:14 -0800 |
commit | 1059f22aae0b21d1991929973cb77780cfc2f1b7 (patch) | |
tree | 8be0d94a4a06c907d1806e1b8ace3dedfd39b9f5 /python | |
parent | 0aae9644efa8da34e78b8d2b1bc12e185548ab45 (diff) | |
download | fatcat-1059f22aae0b21d1991929973cb77780cfc2f1b7.tar.gz fatcat-1059f22aae0b21d1991929973cb77780cfc2f1b7.zip |
don't allow empty or single-character clean strings
Diffstat (limited to 'python')
-rw-r--r-- | python/fatcat_tools/importers/common.py | 2 |
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 |