diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index f524897eb..9469908bd 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -215,6 +215,10 @@ def sanitize(sanitized, edit=False): tag['alt'] = f'![]({tag["data-src"]})' tag['referrerpolicy'] = "no-referrer" + a = soup.new_tag("a", href=tag["data-src"], rel="nofollow noopener noreferrer") + tag = tag.replace_with(a) + a.append(tag) + for tag in soup.find_all("a"): if tag.get("href") and fishylinks_regex.fullmatch(str(tag.string)): tag.string = tag["href"] diff --git a/files/templates/chat.html b/files/templates/chat.html index a2a6d1462..01b9a0617 100644 --- a/files/templates/chat.html +++ b/files/templates/chat.html @@ -199,7 +199,7 @@ {% include "emoji_modal.html" %} {% include "expanded_image_modal.html" %} - + \ No newline at end of file diff --git a/files/templates/default.html b/files/templates/default.html index 25a0c4e50..b22eec9b7 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -268,7 +268,9 @@ {% block Banner %} {% if '@' not in request.path %} {% if sub %} - /h/{{sub.name}} banner + + /h/{{sub.name}} banner + {% elif SITE_NAME == 'rDrama' %} {% set path = "assets/images/" + SITE_NAME + "/banners" %} {% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=25' %} @@ -365,7 +367,7 @@ - + {% if v %} diff --git a/files/templates/header.html b/files/templates/header.html index 40f7694be..61d809efa 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -290,8 +290,6 @@ - - {% if v and not err %}
{{v.formkey}}
{% endif %} diff --git a/files/templates/sidebar_Cringetopia.html b/files/templates/sidebar_Cringetopia.html index c8a889cd2..25e5a7360 100644 --- a/files/templates/sidebar_Cringetopia.html +++ b/files/templates/sidebar_Cringetopia.html @@ -6,7 +6,9 @@ {% set image='/i/' + SITE_NAME + '/sidebar.webp?v=2000' %} {% endif %} - sidebar image + + sidebar image +

diff --git a/files/templates/sidebar_PCM.html b/files/templates/sidebar_PCM.html index 97fb6dc32..de94c8d3b 100644 --- a/files/templates/sidebar_PCM.html +++ b/files/templates/sidebar_PCM.html @@ -41,8 +41,9 @@ {% set image='/i/' + SITE_NAME + '/sidebar.webp?v=2000' %} {% endif %} - sidebar image - + + sidebar image +

 	
diff --git a/files/templates/sidebar_WPD.html b/files/templates/sidebar_WPD.html
index 2c36f733b..bd34457e6 100644
--- a/files/templates/sidebar_WPD.html
+++ b/files/templates/sidebar_WPD.html
@@ -6,7 +6,9 @@
 		{% set image='/i/' + SITE_NAME + '/sidebar.webp?v=2000' %}
 	{% endif %}
 
-	sidebar image
+	
+		sidebar image
+	
 
 	

diff --git a/files/templates/sidebar_rDrama.html b/files/templates/sidebar_rDrama.html index c53b93fed..f23699755 100644 --- a/files/templates/sidebar_rDrama.html +++ b/files/templates/sidebar_rDrama.html @@ -31,9 +31,13 @@ set VISITORS_HERE_FLAVOR = [ {% endif %} {% if v and (v.is_banned or v.agendaposter) %} - sidebar image + + sidebar image + {% else %} - sidebar image + + sidebar image + {% endif %}

diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 99da8b206..1756573c5 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -123,14 +123,16 @@ post thumnail {% elif p.is_image %} - post thumnail + + post thumnail + {% elif p.is_video or p.is_audio %} - - post thumnail + + post thumnail {% elif p.is_youtube %} - - post thumnail + + post thumnail {% else %} @@ -445,4 +447,4 @@ - + diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 307dc061d..92a31241e 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -369,7 +369,9 @@

diff --git a/files/templates/util/assetcache.html b/files/templates/util/assetcache.html index ef742ee89..6928b87b0 100644 --- a/files/templates/util/assetcache.html +++ b/files/templates/util/assetcache.html @@ -16,17 +16,18 @@ set CACHE_VER = { 'css/win98.css': 61, 'js/award_modal.js': 253, - 'js/bootstrap.js': 266, + 'js/bootstrap.js': 267, 'js/comments+submission_listing.js': 261, + 'js/submission_listing.js': 261, 'js/emoji_modal.js': 296, 'js/formatting.js': 240, - 'js/header.js': 275, 'js/lottery.js': 256, 'js/marked.js': 272, 'js/submit.js': 263, 'js/userpage.js': 241, 'js/userpage_v.js': 245, - + 'js/lozad.js': 260, + 'images/badges/': 1021, } -%}