mirror of https://github.com/zulip/zulip.git
Fix links with invalid emoji in them.
InlinePatterns should return None on failure, not text that may have placeholders in it. (imported from commit f9d8d22b2b8cfa7a92ecf3e52a6c76b48e6f0175)
This commit is contained in:
parent
5ae5f6578c
commit
8842349629
|
@ -365,7 +365,7 @@ class Emoji(markdown.inlinepatterns.Pattern):
|
|||
src = 'static/third/gemoji/images/emoji/%s.png' % (name)
|
||||
return make_emoji(name, src, orig_syntax)
|
||||
else:
|
||||
return orig_syntax
|
||||
return None
|
||||
|
||||
def fixup_link(link, target_blank=True):
|
||||
"""Set certain attributes we want on every link."""
|
||||
|
|
|
@ -3019,6 +3019,9 @@ int x = 3
|
|||
"<p>%s</p>",
|
||||
'http://technet.microsoft.com/en-us/library/Cc751099.rk20_25_big(l=en-us).mov'),
|
||||
|
||||
# Links that match other InlinePatterns
|
||||
('https://metacpan.org/module/Image::Resize::OpenCV', '<p>%s</p>', 'https://metacpan.org/module/Image::Resize::OpenCV'),
|
||||
|
||||
# Just because it has a TLD and parentheses in it doesn't mean it's a link. Trac #1364
|
||||
('a.commandstuff()', '<p>a.commandstuff()</p>', ''),
|
||||
('love...it', '<p>love...it</p>', ''),
|
||||
|
|
Loading…
Reference in New Issue