markdown: Add missing None check in InlineInterestingLinkProcessor.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-10-06 13:58:35 -07:00
committed by Tim Abbott
parent eb9957aa35
commit d01c99d2ee

View File

@@ -1242,7 +1242,7 @@ class InlineInterestingLinkProcessor(markdown.treeprocessors.Treeprocessor):
parsed_url = urllib.parse.urlsplit(urllib.parse.urljoin("/", url))
host = parsed_url.netloc
if host != "" and host != self.md.zulip_realm.host:
if host != "" and (self.md.zulip_realm is None or host != self.md.zulip_realm.host):
continue
if not parsed_url.path.startswith("/user_uploads/"):