Merge pull request #9 from saxnbt/patch-4

Sanitize Markdowns
This commit is contained in:
Business Goose 2022-03-21 08:56:05 +00:00 committed by GitHub
commit 22c174f9ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,7 +108,7 @@ public class DiscordBridge {
message = message.substring(0, 2000); message = message.substring(0, 2000);
} }
return message.replaceAll(colors.pattern(), "").replaceAll(pings.pattern(), "@\u200B"); return message.replaceAll(colors.pattern(), "").replaceAll(pings.pattern(), "@\u200B").replaceAll("([`_~*])", "\\\\$1");
} }
public static void transmitMessage(String message) { public static void transmitMessage(String message) {