Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

markdown: Remove useless locless_schemes check.

Tim Abbott545911b05101
diff --git a/zerver/lib/markdown/__init__.py b/zerver/lib/markdown/__init__.py
index f4a048dd235..5bbd11e2387 100644
--- a/zerver/lib/markdown/__init__.py
+++ b/zerver/lib/markdown/__init__.py
@@ -1565,12 +1565,6 @@ def sanitize_url(url: str) -> Optional[str]:
if not scheme:
return sanitize_url("http://" + url)
- locless_schemes = ["mailto", "news", "file", "bitcoin", "sms", "tel"]
- if netloc == "" and scheme not in locless_schemes:
- # This fails regardless of anything else.
- # Return immediately to save additional processing
- return None
-
# Upstream code will accept a URL like javascript://foo because it
# appears to have a netloc. Additionally there are plenty of other
# schemes that do weird things like launch external programs. To be