From 502cf72653b8e0361ae8b25eb29dc38b36ea6007 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Sat, 30 Oct 2010 00:38:08 +0000
Subject: [PATCH] fix nbsp screwing up POST

---
 .../java/src/net/i2p/router/web/ConfigLoggingHelper.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java
index ce41b1e12e..f316e7dc65 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java
@@ -24,7 +24,9 @@ public class ConfigLoggingHelper extends HelperBase {
     public String getMaxFileSize() {
         int bytes = _context.logManager().getFileSize();
         if (bytes <= 0) return "1.00 MB";
-        return DataHelper.formatSize2(bytes) + 'B';
+        // "&nbsp;" comes back in the POST as 0xc2 0xa0
+        // which is not recognized as whitespace and who knows why
+        return DataHelper.formatSize2(bytes).replace("&nbsp;", " ") + 'B';
     }
     public String getLogLevelTable() {
         StringBuilder buf = new StringBuilder(32*1024);
-- 
GitLab