From 2f2034d0eca22fef369372a0799cce6443f83ff6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 7 Aug 2020 21:43:54 +0100 Subject: [PATCH] Long hashtags are invalid --- content.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content.py b/content.py index 2d2bc7d88..488601702 100644 --- a/content.py +++ b/content.py @@ -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')