From 11fd50419d7356ef0e1560d42e937d0eec76b565 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 8 Feb 2021 21:27:46 +0000 Subject: [PATCH] Invalid characters in hashtags --- categories.py | 2 +- webapp_hashtagswarm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/categories.py b/categories.py index 2d490dfc0..0bf36fda3 100644 --- a/categories.py +++ b/categories.py @@ -114,7 +114,7 @@ def _validHashtagCategory(category: str) -> bool: if not category: return False - invalidChars = (',', ' ', '<', ';', '\\', '"') + invalidChars = (',', ' ', '<', ';', '\\', '"', '&') for ch in invalidChars: if ch in category: return False diff --git a/webapp_hashtagswarm.py b/webapp_hashtagswarm.py index e898ba563..70484096d 100644 --- a/webapp_hashtagswarm.py +++ b/webapp_hashtagswarm.py @@ -154,7 +154,7 @@ def htmlHashTagSwarm(baseDir: str, actor: str, translate: {}) -> str: if len(hashTagName) > maxTagLength: # NoIncrediblyLongAndBoringHashtagsShownHere continue - if '"' in hashTagName or "'" in hashTagName: + if '&' in hashTagName or '"' in hashTagName or "'" in hashTagName: continue if '#' + hashTagName + '\n' in blockedStr: continue