Fix bug in text encoding method.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 25 Oct 2013 17:14:57 +0000 (19:14 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 28 Feb 2014 21:25:39 +0000 (22:25 +0100)
src/main/java/net/pterodactylus/sone/fcp/AbstractSoneCommand.java

index 58be3da..0d2e813 100644 (file)
@@ -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");
        }
 
        /**