diff --git a/files/classes/comment.py b/files/classes/comment.py index 2a2c04cc1..9c48b9d95 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -296,9 +296,6 @@ class Comment(Base): if not self.ghost and self.author.show_sig(v): body += f'

{self.author.sig_html}
' - if v: - body = body.replace("!YOU!", v.username) - return body @lazy @@ -312,9 +309,6 @@ class Comment(Base): body = censor_slurs(body, v).replace(':marseytrain:', ':marseytrain:') - if v: - body = body.replace("!YOU!", v.username) - return body @lazy diff --git a/files/classes/submission.py b/files/classes/submission.py index 7623e1911..6fc18642a 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -319,9 +319,6 @@ class Submission(Base): if not listing and not self.ghost and self.author.show_sig(v): body += f'

{self.author.sig_html}
' - if v: - body = body.replace("!YOU!", v.username) - return body @lazy @@ -335,9 +332,6 @@ class Submission(Base): body = censor_slurs(body, v).replace(':marseytrain:', ':marseytrain:') body = normalize_urls_runtime(body, v) - if v: - body = body.replace("!YOU!", v.username) - return body @lazy @@ -346,9 +340,6 @@ class Submission(Base): title = censor_slurs(title, v) - if v: - title = title.replace("!YOU!", v.username) - return title @lazy @@ -357,9 +348,6 @@ class Submission(Base): title = censor_slurs(title, v).replace(':marseytrain:', ':marseytrain:') - if v: - title = title.replace("!YOU!", v.username) - return title @property diff --git a/files/classes/user.py b/files/classes/user.py index b532a1b91..2d8d0c747 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -1019,7 +1019,6 @@ class User(Base): if not cls.can_see(user, other.author): return False if user and user.id == other.author_id: return True if isinstance(other, Submission): - if "!YOU!" in other.title and not user: return False if browser != 'webview' and other.author_id == AEVANN_ID and other.title.startswith('[ANDROID]'): return user and user.admin_level >= PERMS['POST_COMMENT_MODERATION'] if browser != 'apple' and other.author_id == CARP_ID and other.title.startswith('[APPLE]'): diff --git a/files/helpers/const.py b/files/helpers/const.py index 880b01c2d..0697f1fe9 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -1603,11 +1603,9 @@ def is_site_url(url): def is_safe_url(url): domain = tldextract.extract(url) - return (( - is_site_url(url) - or domain.registered_domain in approved_embed_hosts - or domain.fqdn in approved_embed_hosts - ) and '!YOU!' not in url) + return (is_site_url(url) + or domain.registered_domain in approved_embed_hosts + or domain.fqdn in approved_embed_hosts) hosts = "|".join(approved_embed_hosts).replace('.','\.') diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 0412e8d85..820abc771 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -61,7 +61,7 @@ def allowed_attributes(tag, name, value): return False if tag == 'a': - if name == 'href' and '\\' not in value and 'xn--' not in value and '!YOU!' not in value: + if name == 'href' and '\\' not in value and 'xn--' not in value: return True if name == 'rel' and value == 'nofollow noopener': return True if name == 'target' and value == '_blank': return True