forked from indymedia/epicyon
Long hashtags are invalid
parent
cc90910908
commit
2f2034d0ec
|
@ -267,6 +267,9 @@ def addWebLinks(content: str) -> str:
|
||||||
def validHashTag(hashtag: str) -> bool:
|
def validHashTag(hashtag: str) -> bool:
|
||||||
"""Returns true if the give hashtag contains valid characters
|
"""Returns true if the give hashtag contains valid characters
|
||||||
"""
|
"""
|
||||||
|
# long hashtags are not valid
|
||||||
|
if len(hashtag) >= 32:
|
||||||
|
return False
|
||||||
validChars = set('0123456789' +
|
validChars = set('0123456789' +
|
||||||
'abcdefghijklmnopqrstuvwxyz' +
|
'abcdefghijklmnopqrstuvwxyz' +
|
||||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
|
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
|
||||||
|
|
Loading…
Reference in New Issue