mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
upload: Show text/plain uploads inline.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
f4cbdd8c9c
commit
84d5ef1285
@@ -22,6 +22,7 @@ INLINE_MIME_TYPES = [
|
|||||||
"image/jpeg",
|
"image/jpeg",
|
||||||
"image/png",
|
"image/png",
|
||||||
"image/webp",
|
"image/webp",
|
||||||
|
"text/plain",
|
||||||
"video/mp4",
|
"video/mp4",
|
||||||
"video/webm",
|
"video/webm",
|
||||||
# To avoid cross-site scripting attacks, DO NOT add types such
|
# To avoid cross-site scripting attacks, DO NOT add types such
|
||||||
|
|||||||
@@ -1005,14 +1005,11 @@ class FileUploadTest(UploadSerializeMixin, ZulipTestCase):
|
|||||||
self.assertIn(content_disposition, response["Content-disposition"])
|
self.assertIn(content_disposition, response["Content-disposition"])
|
||||||
self.assertEqual(set(response["Cache-Control"].split(", ")), {"private", "immutable"})
|
self.assertEqual(set(response["Cache-Control"].split(", ")), {"private", "immutable"})
|
||||||
|
|
||||||
check_xsend_links(
|
check_xsend_links("zulip.txt", "zulip.txt", 'filename="zulip.txt"')
|
||||||
"zulip.txt", "zulip.txt", 'filename="zulip.txt"', returned_attachment=True
|
|
||||||
)
|
|
||||||
check_xsend_links(
|
check_xsend_links(
|
||||||
"áéБД.txt",
|
"áéБД.txt",
|
||||||
"%C3%A1%C3%A9%D0%91%D0%94.txt",
|
"%C3%A1%C3%A9%D0%91%D0%94.txt",
|
||||||
"filename*=utf-8''%C3%A1%C3%A9%D0%91%D0%94.txt",
|
"filename*=utf-8''%C3%A1%C3%A9%D0%91%D0%94.txt",
|
||||||
returned_attachment=True,
|
|
||||||
)
|
)
|
||||||
check_xsend_links(
|
check_xsend_links(
|
||||||
"zulip.html",
|
"zulip.html",
|
||||||
|
|||||||
Reference in New Issue
Block a user