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: if not category:
return False return False
invalidChars = (',', ' ', '<', ';', '\\') invalidChars = (',', ' ', '<', ';', '\\', '"')
for ch in invalidChars: for ch in invalidChars:
if ch in category: if ch in category:
return False return False

View File

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