Fixed url regex

This commit is contained in:
Yusur 2019-10-15 16:32:36 +02:00
parent 01cb4354e0
commit 313c001a63
2 changed files with 2 additions and 1 deletions

2
app.py
View file

@ -620,7 +620,7 @@ def username_availability(username):
_enrich_symbols = [
(r'\n', 'NEWLINE'),
(r'https?://(?:[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*|\[[A-Fa-f0-9:]+\])'
r'(?::\d+)?(?:/.*)?(?:\?.*)?(?:#.*)?', 'URL'),
r'(?::\d+)?(?:/[^\s]*)?(?:\?[^\s]*)?(?:#[^\s]*)?', 'URL'),
(_mention_re, 'MENTION'),
(r'[^h\n+]+', 'TEXT'),
(r'.', 'TEXT')