Invalid characters in hashtags

main
Bob Mottram 2021-02-08 21:27:46 +00:00
parent 41806db01e
commit 11fd50419d
2 changed files with 2 additions and 2 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,7 +154,7 @@ 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: if '&' in hashTagName or '"' in hashTagName or "'" in hashTagName:
continue continue
if '#' + hashTagName + '\n' in blockedStr: if '#' + hashTagName + '\n' in blockedStr:
continue continue