/*
- * Sone - AbstractSoneCommand.java - Copyright © 2011–2015 David Roden
+ * Sone - AbstractSoneCommand.java - Copyright © 2011–2016 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* @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");
}
/**