Properly escape backslash

This commit is contained in:
Business Goose 2022-03-29 22:37:31 +01:00
parent bb4dd0f931
commit 2afd1e6d19
No known key found for this signature in database
GPG key ID: 77DCA801362E9645

View file

@ -215,6 +215,6 @@ public class DiscordBridge {
public static String fullySanitizeDiscordMessage(String message)
{
String partiallySanitized = sanitizeMessage(message);
return partiallySanitized.replaceAll("\\\\", "\\\\\\").replaceAll("([`_~*|])", "\\\\$1");
return partiallySanitized.replaceAll("([`_~*|\\\\])", "\\\\$1");
}
}