mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
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:
committed by
Tim Abbott
parent
864649aa3e
commit
140fcee48c
@@ -1239,7 +1239,7 @@ class InlineInterestingLinkProcessor(markdown.treeprocessors.Treeprocessor):
|
|||||||
parsed_url = urllib.parse.urlsplit(urllib.parse.urljoin("/", url))
|
parsed_url = urllib.parse.urlsplit(urllib.parse.urljoin("/", url))
|
||||||
host = parsed_url.netloc
|
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
|
continue
|
||||||
|
|
||||||
if not parsed_url.path.startswith("/user_uploads/"):
|
if not parsed_url.path.startswith("/user_uploads/"):
|
||||||
|
|||||||
Reference in New Issue
Block a user