summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_tools/importers/common.py')
-rw-r--r--python/fatcat_tools/importers/common.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/fatcat_tools/importers/common.py b/python/fatcat_tools/importers/common.py
index 7c2ce400..32f7b4d5 100644
--- a/python/fatcat_tools/importers/common.py
+++ b/python/fatcat_tools/importers/common.py
@@ -28,7 +28,7 @@ def clean(thing, force_xml=False):
Also strips extra whitespace.
"""
if not thing:
- return thing
+ return None
fix_entities = 'auto'
if force_xml:
fix_entities = True
@@ -41,7 +41,8 @@ def clean(thing, force_xml=False):
def test_clean():
assert clean(None) == None
- assert clean('') == ''
+ assert clean('') == None
+ assert clean('1') == None
assert clean('123') == '123'
assert clean('a&b') == 'a&b'
assert clean('<b>a&amp;b</b>') == '<b>a&amp;b</b>'