aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-23 20:27:02 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-23 20:27:02 -0700
commit3a4344d1e26e679b0dc9558d15752e53ce86f8ac (patch)
treee503a607d5ae271ee9caf088f3ad99ed5fd11d40
parentd449fe692eff80c5241a2ea364a39668cf2c9002 (diff)
downloadchocula-3a4344d1e26e679b0dc9558d15752e53ce86f8ac.tar.gz
chocula-3a4344d1e26e679b0dc9558d15752e53ce86f8ac.zip
block some meta strings
-rw-r--r--chocula/util.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/chocula/util.py b/chocula/util.py
index a52e1ec..ce48ab6 100644
--- a/chocula/util.py
+++ b/chocula/util.py
@@ -346,6 +346,9 @@ def clean_str(s: Optional[str]) -> Optional[str]:
# non-sorting
s.replace("\u02dc", "")
s.replace("\u0153", "")
+ # there is a very samll chance this will filter out valid strings
+ if s.lower() in ("null", "n/a", "unknown"):
+ return None
return s or None