From e129375fb8b3d16242dcf3e23e45c72f7e6f7b59 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 9 Dec 2021 22:30:14 +0200 Subject: [PATCH] fdsfsd --- files/__main__.py | 1 - files/classes/comment.py | 4 +++- files/helpers/sanitize.py | 6 ++++++ files/templates/comments.html | 2 +- files/templates/submission.html | 8 ++++---- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/files/__main__.py b/files/__main__.py index dec99ea7f..de8ff43f9 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -128,5 +128,4 @@ def after_request(response): response.headers.add("Content-Security-Policy", "script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src 'self' tls-use1.fpapi.io api.fpjs.io 02ddcc80-b8db-42be-9022-44c546b4dce6.pushnotifications.pusher.com; object-src 'none';") return response - from files.routes import * \ No newline at end of file diff --git a/files/classes/comment.py b/files/classes/comment.py index 164a7b775..4478e9052 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -401,7 +401,9 @@ class Comment(Base): for o in self.options: html += f'
'
 		return html
diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py
index b25a1e5ee..ed8f2eac0 100644
--- a/files/helpers/sanitize.py
+++ b/files/helpers/sanitize.py
@@ -39,6 +39,9 @@ allowed_tags = tags = ['b',
 						'a',
 						'img',
 						'span',
+						'ruby',
+						'rp',
+						'rt',
 						]
 
 no_images = ['b',
@@ -71,6 +74,9 @@ no_images = ['b',
 						'marquee',
 						'a',
 						'span',
+						'ruby',
+						'rp',
+						'rt',
 						]
 
 def sanitize_marquee(tag, name, value):
diff --git a/files/templates/comments.html b/files/templates/comments.html
index ac5050d5b..edfb51e1b 100644
--- a/files/templates/comments.html
+++ b/files/templates/comments.html
@@ -761,7 +761,7 @@
 {% include "expanded_image_modal.html" %}
 
 
-
+
 
 
+									
 								{% else %}
-									
+									
 								{% endif %}
 							{% elif p.domain in ['youtu.be','youtube.com'] and p.embed_url and p.embed_url.startswith('								
-									
+									
 									
 								
 							{% endfor %}
@@ -873,7 +873,7 @@
 			{% include "ban_modal.html" %}
 		{% endif %}
 	{% endif %}
-	
+	
 	{% include "expanded_image_modal.html" %}
 {% endif %}