2007-12-26 Complication

* Escape both CR, LF and CR LF line breaks in Router.saveConfig()
      and unescape them in DataHelper.loadProps() to support
      saving and loading config properties with line breaks
    * Change the update URLs textbox into a textarea like keys have,
      so different URLs go on different lines
    * Modify TrustedUpdate to provide a method which supplies a key list
      delimited with CR LF line breaks
    * Modify DEFAULT_UPDATE_URL to supply a default URL list
      delimited with CR LF line breaks
    * Modify selectUpdateURL() to handle URL lists
      delimited by any kind of line breaks
    * Start saving trusted update keys
    * Improve formatting on configupdate.jsp
This commit is contained in:
complication
2007-12-26 08:14:54 +00:00
committed by zzz
parent e9bd6907d1
commit 4e68f2a157
9 changed files with 88 additions and 33 deletions

View File

@ -939,6 +939,10 @@ public class Router {
for (Iterator iter = ordered.iterator() ; iter.hasNext(); ) {
String key = (String)iter.next();
String val = _config.getProperty(key);
// Escape line breaks before saving.
// Remember: "\" needs escaping both for regex and string.
val = val.replaceAll("\\r","\\\\r");
val = val.replaceAll("\\n","\\\\n");
buf.append(key).append('=').append(val).append('\n');
}
}

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.536 $ $Date: 2007-12-10 17:22:59 $";
public final static String ID = "$Revision: 1.537 $ $Date: 2007-12-22 18:58:46 $";
public final static String VERSION = "0.6.1.30";
public final static long BUILD = 8;
public final static long BUILD = 9;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);