Fixed url regex
This commit is contained in:
parent
01cb4354e0
commit
313c001a63
2 changed files with 2 additions and 1 deletions
|
|
@ -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.
|
* 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.
|
* 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.
|
* Fixed a bug when uploading.
|
||||||
|
* Moved the site name, previously hard-coded into templates, into `config.py`.
|
||||||
|
|
||||||
## 0.4.0
|
## 0.4.0
|
||||||
|
|
||||||
|
|
|
||||||
2
app.py
2
app.py
|
|
@ -620,7 +620,7 @@ def username_availability(username):
|
||||||
_enrich_symbols = [
|
_enrich_symbols = [
|
||||||
(r'\n', 'NEWLINE'),
|
(r'\n', 'NEWLINE'),
|
||||||
(r'https?://(?:[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*|\[[A-Fa-f0-9:]+\])'
|
(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'),
|
(_mention_re, 'MENTION'),
|
||||||
(r'[^h\n+]+', 'TEXT'),
|
(r'[^h\n+]+', 'TEXT'),
|
||||||
(r'.', 'TEXT')
|
(r'.', 'TEXT')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue