diff --git a/zerver/lib/bugdown/__init__.py b/zerver/lib/bugdown/__init__.py index c25949556e..683c963d0c 100644 --- a/zerver/lib/bugdown/__init__.py +++ b/zerver/lib/bugdown/__init__.py @@ -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.""" diff --git a/zerver/tests.py b/zerver/tests.py index a8ef93d25c..d57f7caf4e 100644 --- a/zerver/tests.py +++ b/zerver/tests.py @@ -3019,6 +3019,9 @@ int x = 3 "
%s
", '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', '%s
', '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()', 'a.commandstuff()
', ''), ('love...it', 'love...it
', ''),