mirror of https://github.com/zulip/zulip.git
bugdown: Disallow ()[]{}<> in linkified URLs.
This allows us to handle messages like my website (available at http://google.com) (imported from commit 51330507947fc039b6f29f06dfa1c6d21f779aa4)
This commit is contained in:
parent
1c4bbd6a49
commit
05c08b41c4
|
@ -33,7 +33,7 @@ class Bugdown(markdown.Extension):
|
|||
md.inlinePatterns.add('gravatar', Gravatar(r'!gravatar\((?P<email>[^)]*)\)'), '_begin')
|
||||
|
||||
# A link starts after whitespace and continues to the next whitespace.
|
||||
link_regex = r'\b(?P<url>https?://[^\s]+)'
|
||||
link_regex = r'\b(?P<url>https?://[^\s[\](){}<>]+)'
|
||||
md.inlinePatterns.add('autolink', AutoLink(link_regex), '_begin')
|
||||
|
||||
# We need to re-initialize the markdown engine every 30 messages
|
||||
|
|
Loading…
Reference in New Issue