mirror of
https://github.com/zulip/zulip.git
synced 2025-10-22 20:42:14 +00:00
markdown: Use re-exported guess_type to ensure adding EXTRA_MIME_TYPES.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
66466760a0
commit
b8f8056f56
@@ -1,7 +1,6 @@
|
||||
# Zulip's main Markdown implementation. See docs/subsystems/markdown.md for
|
||||
# detailed documentation on our Markdown syntax.
|
||||
import logging
|
||||
import mimetypes
|
||||
import re
|
||||
import time
|
||||
from collections import deque
|
||||
@@ -1032,7 +1031,7 @@ class InlineInterestingLinkProcessor(markdown.treeprocessors.Treeprocessor):
|
||||
if not self.zmd.image_preview_enabled:
|
||||
return False
|
||||
|
||||
url_type = mimetypes.guess_type(url)[0]
|
||||
url_type = guess_type(url)[0]
|
||||
# Support only video formats (containers) that are supported cross-browser and cross-device. As per
|
||||
# https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#index_of_media_container_formats_file_types
|
||||
# MP4 and WebM are the only formats that are widely supported.
|
||||
|
||||
Reference in New Issue
Block a user