From 409c9ad75b153e228970349081b908cf49391fff Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 27 Oct 2023 01:25:41 +0300 Subject: [PATCH] nasty hack to fix this https://rdrama.net/post/215249/i-saved-a-dramatards-life/5251156#context --- files/helpers/sanitize.py | 4 ++-- files/helpers/sharpen.py | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index a56cbfff71..092542fa10 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -383,7 +383,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis sanitized = marsify(sanitized, author.chud_phrase) if obj and obj.sharpened: - sanitized = sharpen(sanitized) + sanitized = sharpen(sanitized, v) if '```' not in sanitized and '
' not in sanitized:
 		sanitized = linefeeds_regex.sub(r'\1\n\n\2', sanitized)
@@ -683,7 +683,7 @@ def filter_emojis_only(title, golden=True, count_emojis=False, obj=None, author=
 			title = marsify(title, author.chud_phrase)
 
 	if obj and obj.sharpened:
-		title = sharpen(title)
+		title = sharpen(title, v)
 
 	emojis_used = set()
 
diff --git a/files/helpers/sharpen.py b/files/helpers/sharpen.py
index 04903ec539..6f120053c6 100644
--- a/files/helpers/sharpen.py
+++ b/files/helpers/sharpen.py
@@ -1,7 +1,14 @@
 from files.helpers.regex import *
 
-def sharpen(string):
+def sharpen(string, v):
+	if v.chud_phrase:
+		string = string.replace(v.chud_phrase, 'erfdsx34224e4535resfed')
+
 	string = the_fucking_regex.sub("\g<1> fucking", string)
 	string = bitch_question_mark_regex.sub(", bitch?", string)
 	string = exclamation_point_regex.sub(", motherfucker!", string)
+
+	if v.chud_phrase:
+		string = string.replace('erfdsx34224e4535resfed', v.chud_phrase)
+
 	return string