From e59bcfc467186a48511826b95212e1f7ed1e39c4 Mon Sep 17 00:00:00 2001
From: Aevann1
Date: Fri, 14 Jan 2022 06:38:27 +0200
Subject: [PATCH] bb
---
files/classes/submission.py | 2 +-
files/helpers/sanitize.py | 4 ++--
files/templates/formatting.html | 2 +-
files/templates/submission.html | 2 +-
files/templates/submission_listing.html | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/files/classes/submission.py b/files/classes/submission.py
index 6d87b7da7e..4b5a1e8d3d 100644
--- a/files/classes/submission.py
+++ b/files/classes/submission.py
@@ -424,7 +424,7 @@ class Submission(Base):
@property
@lazy
def is_video(self):
- return self.url and any((self.url.lower().endswith(x) for x in ('.mp4','.webm','.mov', '#t=0.1')))
+ return self.url and any((self.url.lower().endswith(x) for x in ('.mp4','.webm','.mov')))
@property
@lazy
diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py
index 8db6bdf93d..866233edc0 100644
--- a/files/helpers/sanitize.py
+++ b/files/helpers/sanitize.py
@@ -247,9 +247,9 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False):
sanitized = sanitized.replace(replacing, htmlsource)
for i in re.finditer('>(https://.*?\.(mp4|webm|mov))
', sanitized):
- sanitized = sanitized.replace(f'{i.group(1)}
', f'')
+ sanitized = sanitized.replace(f'
{i.group(1)}
', f'')
for i in re.finditer('
(https:.*?\.(mp4|webm|mov))
', sanitized):
- sanitized = sanitized.replace(i.group(0), f'')
+ sanitized = sanitized.replace(i.group(0), f'
')
for rd in ["://reddit.com", "://new.reddit.com", "://www.reddit.com", "://redd.it", "://libredd.it"]:
sanitized = sanitized.replace(rd, "://old.reddit.com")
diff --git a/files/templates/formatting.html b/files/templates/formatting.html
index 0da8bc7557..bcbd977055 100644
--- a/files/templates/formatting.html
+++ b/files/templates/formatting.html
@@ -64,7 +64,7 @@ You can use Markdown formatting:
Video Files |
https://files.catbox.moe/v4om92.mp4 |
- |
+ |
Emojis |
diff --git a/files/templates/submission.html b/files/templates/submission.html
index 0f5b25b70f..94a899d1cc 100644
--- a/files/templates/submission.html
+++ b/files/templates/submission.html
@@ -429,7 +429,7 @@
{% elif p.is_video %}
-
diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html
index 6c5dcad586..b0f22e7ea6 100644
--- a/files/templates/submission_listing.html
+++ b/files/templates/submission_listing.html
@@ -528,7 +528,7 @@
{% elif p.is_video %}
-
+