No quotes in hashtags

merge-requests/30/head
Bob Mottram 2021-02-08 21:20:01 +00:00
parent 43775447cc
commit 41806db01e
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -154,6 +154,8 @@ def htmlHashTagSwarm(baseDir: str, actor: str, translate: {}) -> str:
if len(hashTagName) > maxTagLength:
# NoIncrediblyLongAndBoringHashtagsShownHere
continue
if '"' in hashTagName or "'" in hashTagName:
continue
if '#' + hashTagName + '\n' in blockedStr:
continue
with open(tagsFilename, 'r') as fp: