diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d64fc0..58ee3f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Rewritten `enrich` filter, correcting a serious security flaw. The new filter uses a tokenizer and escapes all non-markup text. Plus, now the `+` of the mention is visible, but weakened; newlines are now visible in the message. * Now you can edit or change privacy to messages after they are published. After a message it's edited, the date and time of the message is changed. * Fixed a bug when uploading. +* Moved the site name, previously hard-coded into templates, into `config.py`. ## 0.4.0 diff --git a/app.py b/app.py index 04fb230..b7c92da 100644 --- a/app.py +++ b/app.py @@ -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')