markdown: Add missing None check in InlineInterestingLinkProcessor.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit d01c99d2ee)
This commit is contained in:
Anders Kaseorg
2022-10-06 13:58:35 -07:00
committed by Tim Abbott
parent 864649aa3e
commit 140fcee48c

View File

@@ -1239,7 +1239,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/"):