Long hashtags are invalid

This commit is contained in:
bashrc committed 2020-08-07 21:43:54 +01:00
1 parent cc90910908
commit 2f2034d0ec
1 file changed
+3
+3
View File
@@ -267,6 +267,9 @@ def addWebLinks(content: str) -> str:
def validHashTag(hashtag: str) -> bool:
"""Returns true if the give hashtag contains valid characters
"""
# long hashtags are not valid
if len(hashtag) >= 32:
return False
validChars = set('0123456789' +
'abcdefghijklmnopqrstuvwxyz' +
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')