From: David ‘Bombe’ Roden Date: Fri, 25 Oct 2013 17:14:57 +0000 (+0200) Subject: Fix bug in text encoding method. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=83b8263ab021c27541641c11380c66d589a06242;p=Sone.git Fix bug in text encoding method. --- diff --git a/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java b/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java index 58be3da..0d2e813 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java @@ -115,7 +115,7 @@ public abstract class AbstractSoneCommand extends AbstractCommand { * @return The encoded text */ protected static String encodeString(String text) { - return text.replaceAll("\\\\", "\\\\").replaceAll("\n", "\\\\n").replaceAll("\r", "\\\\r"); + return text.replaceAll("\\\\", "\\\\\\\\").replaceAll("\n", "\\\\n").replaceAll("\r", "\\\\r"); } /**