Skip to content

Commit

Permalink
Escape discord.gg invites in mod alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
ZechCodes committed Apr 22, 2024
1 parent 1983ceb commit 5f39c15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extensions/mods/auto_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,4 +382,6 @@ def get_scam_links(self, content: str) -> set[str]:
}

def escape_links(self, content: str) -> str:
return re.sub(r"(http[s]?://)(.+?)(\s|\/|$)", r"\1 \2 \3", content)
escaped = re.sub(r"(http[s]?://)(.+?)(\s|\/|$)", r"\1 \2 \3", content)
escaped = re.sub(r"discord\.gg", r"discord . gg", escaped)
return escaped

0 comments on commit 5f39c15

Please sign in to comment.