From 1aa24a38a498080d8f48667d90b2ac8078461055 Mon Sep 17 00:00:00 2001
From: kytv <kytv@mail.i2p>
Date: Fri, 2 Mar 2012 18:46:34 +0000
Subject: [PATCH] Various HTML fixes

---
 .../java/src/org/klomp/snark/web/I2PSnarkServlet.java     | 2 +-
 .../java/src/net/i2p/router/web/GraphHelper.java          | 8 ++++----
 .../java/src/net/i2p/router/web/TunnelRenderer.java       | 3 ++-
 apps/routerconsole/jsp/configstats.jsp                    | 6 +++---
 apps/susidns/src/jsp/addressbook.jsp                      | 6 +++---
 apps/susidns/src/jsp/config.jsp                           | 2 +-
 apps/susidns/src/jsp/details.jsp                          | 4 ++--
 apps/susidns/src/jsp/subscriptions.jsp                    | 2 +-
 .../src/net/i2p/router/transport/TransportManager.java    | 6 +++---
 9 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
index 830b92b2a0..53c20b8f3b 100644
--- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
+++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
@@ -1604,7 +1604,7 @@ public class I2PSnarkServlet extends Default {
                    "<td align=\"left\"><input type=\"text\" size=\"16\" name=\"tname\"></td>" +
                    "<td align=\"left\"><input type=\"text\" size=\"40\" name=\"thurl\"></td>" +
                    "<td align=\"left\"><input type=\"text\" size=\"40\" name=\"taurl\"></td></tr>\n" +
-                   "<td colspan=\"2\"></td><td colspan=\"2\" align=\"left\">\n" +
+                   "<tr><td colspan=\"2\"></td><td colspan=\"2\" align=\"left\">\n" +
                    "<input type=\"submit\" name=\"taction\" class=\"default\" value=\"").append(_("Add tracker")).append("\">\n" +
                    "<input type=\"submit\" name=\"taction\" class=\"delete\" value=\"").append(_("Delete selected")).append("\">\n" +
                    // "<input type=\"reset\" class=\"cancel\" value=\"").append(_("Cancel")).append("\">\n" +
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/GraphHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/GraphHelper.java
index f31c7def56..b5d54b4112 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/GraphHelper.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/GraphHelper.java
@@ -341,8 +341,8 @@ public class GraphHelper extends FormHandler {
                        "<input type=\"hidden\" name=\"action\" value=\"foo\">\n" +
                        "<input type=\"hidden\" name=\"nonce\" value=\"" + nonce + "\" >\n");
             _out.write(_("Periods") + ": <input size=\"5\" style=\"text-align: right;\" type=\"text\" name=\"periodCount\" value=\"" + _periodCount + "\"><br>\n");
-            _out.write(_("Plot averages") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : "checked=\"true\" ") + "> ");
-            _out.write(_("or")+ " " +_("plot events") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? "checked=\"true\" " : "") + "><br>\n");
+            _out.write(_("Plot averages") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : "checked=\"checked\" ") + "> ");
+            _out.write(_("or")+ " " +_("plot events") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? "checked=\"checked\" " : "") + "><br>\n");
             _out.write(_("Image sizes") + ": " + _("width") + ": <input size=\"4\" style=\"text-align: right;\" type=\"text\" name=\"width\" value=\"" + _width 
                        + "\"> " + _("pixels") + ", " + _("height") + ": <input size=\"4\" style=\"text-align: right;\" type=\"text\" name=\"height\" value=\"" + _height  
                        + "\"> " + _("pixels") + "<br>\n");
@@ -352,7 +352,7 @@ public class GraphHelper extends FormHandler {
                 _out.write(Integer.toString(times[i]));
                 _out.write("\"");
                 if (times[i] == _refreshDelaySeconds)
-                    _out.write(" selected=\"true\"");
+                    _out.write(" selected=\"selected\"");
                 _out.write(">");
                 if (times[i] > 0)
                     _out.write(DataHelper.formatDuration2(times[i] * 1000));
@@ -365,7 +365,7 @@ public class GraphHelper extends FormHandler {
                        " <input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"persistent\"");
             boolean persistent = _context.getBooleanPropertyDefaultTrue(SummaryListener.PROP_PERSISTENT);
             if (persistent)
-                _out.write(" checked=\"true\"");
+                _out.write(" checked=\"checked\"");
             _out.write(">" +
                        "<hr><div class=\"formaction\"><input type=\"submit\" class=\"acceot\" value=\"" + _("Save settings and redraw graphs") + "\"></div></form>");
         } catch (IOException ioe) {
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/TunnelRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/TunnelRenderer.java
index 73efe19de4..fdc670f534 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/TunnelRenderer.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/TunnelRenderer.java
@@ -134,6 +134,7 @@ public class TunnelRenderer {
         out.write("<div class=\"statusnotes\"><b>" + _("Inactive participating tunnels") + ": " + inactive + "</b></div>\n");
         out.write("<div class=\"statusnotes\"><b>" + _("Lifetime bandwidth usage") + ": " + DataHelper.formatSize2(processed*1024) + "B</b></div>\n");
         //renderPeers(out);
+        out.write("</div>");
     }
     
     private static class TunnelComparator implements Comparator<HopConfig> {
@@ -222,7 +223,7 @@ public class TunnelRenderer {
             }
         }
         if (live <= 0)
-            out.write("<div class=\"statusnotes\"><center><b>" + _("No tunnels; waiting for the grace period to end.") + "</center></b></div>\n");
+            out.write("<div class=\"statusnotes\"><center><b>" + _("No tunnels; waiting for the grace period to end.") + "</b></center></div>\n");
         out.write("<div class=\"statusnotes\"><center><b>" + _("Lifetime bandwidth usage") + ": " +
                   DataHelper.formatSize2(processedIn*1024) + "B " + _("in") + ", " +
                   DataHelper.formatSize2(processedOut*1024) + "B " + _("out") + "</b></center></div>");
diff --git a/apps/routerconsole/jsp/configstats.jsp b/apps/routerconsole/jsp/configstats.jsp
index 94cf968331..f284badae4 100644
--- a/apps/routerconsole/jsp/configstats.jsp
+++ b/apps/routerconsole/jsp/configstats.jsp
@@ -76,7 +76,7 @@ function toggleAll(category)
  <h3><%=intl._("Configure I2P Stat Collection")%></h3>
  <p><%=intl._("Enable full stats?")%>
  <input type="checkbox" class="optbox" name="isFull" value="true" <%
- if (statshelper.getIsFull()) { %>checked="true" <% } %> >
+ if (statshelper.getIsFull()) { %>checked="checked" <% } %> >
  (<%=intl._("change requires restart to take effect")%>)<br>
 <%
 
@@ -122,7 +122,7 @@ Warning - Log with care, stat file grows without limit.<br>
 %>   <td align="center">
      <a name="<%=statshelper.getCurrentStatName()%>"></a>
      <input type="checkbox" class="optbox <%=statshelper.getCurrentGroupName()%>" name="statList" value="<%=statshelper.getCurrentStatName()%>" <%
-     if (statshelper.getCurrentIsLogged()) { %>checked="true" <% } %> ></td>
+     if (statshelper.getCurrentIsLogged()) { %>checked="checked" <% } %> ></td>
 <%
 
   }  // shouldShowLog
@@ -130,7 +130,7 @@ Warning - Log with care, stat file grows without limit.<br>
 %>   <td align="center">
      <% if (statshelper.getCurrentCanBeGraphed()) { %>
        <input type="checkbox" class="optbox <%=statshelper.getCurrentGroupName()%>" name="graphList" value="<%=statshelper.getCurrentGraphName()%>" <%
-       if (statshelper.getCurrentIsGraphed()) { %>checked="true" <% } %> ><% } %></td>
+       if (statshelper.getCurrentIsGraphed()) { %>checked="checked" <% } %> ><% } %></td>
      <td align="left"><b><%=statshelper.getCurrentStatName()%>:</b><br>
      <%=statshelper.getCurrentStatDescription()%></td></tr><%
     } // end iterating over all stats
diff --git a/apps/susidns/src/jsp/addressbook.jsp b/apps/susidns/src/jsp/addressbook.jsp
index 4736a4dc01..12d56987e3 100644
--- a/apps/susidns/src/jsp/addressbook.jsp
+++ b/apps/susidns/src/jsp/addressbook.jsp
@@ -42,7 +42,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>${book.book} <%=intl._("address book")%> - susidns</title>
 <link rel="stylesheet" type="text/css" href="css.css">
 </head>
@@ -158,7 +158,7 @@ ${book.loadBookMessages}
 </td><td class="names">
 <span class="addrhlpr"><a href="details?h=${addr.name}" title="<%=intl._("More information on this entry")%>"><%=intl._("details")%></a></span>
 </td>
-<td class="destinations"><textarea rows="1" style="height: 3em;" cols="40" wrap="off" readonly="readonly" name="dest_${addr.name}" >${addr.destination}</textarea></td>
+<td class="destinations"><textarea rows="1" style="height:3em;whitespace:nowrap" cols="40" readonly="readonly" name="dest_${addr.name}" >${addr.destination}</textarea></td>
 </tr>
 </c:forEach>
 </table>
@@ -190,7 +190,7 @@ ${book.loadBookMessages}
 <table><tr><td>
 <b><%=intl._("Host Name")%></b></td><td><input type="text" name="hostname" value="${book.hostname}" size="54">
 </td></tr><tr><td>
-<b><%=intl._("Destination")%></b></td><td><textarea name="destination" rows="1" style="height: 3em;" cols="70" wrap="off" spellcheck="false">${book.destination}</textarea>
+<b><%=intl._("Destination")%></b></td><td><textarea name="destination" rows="1" style="height:3em;whitespace:nowrap" cols="70" spellcheck="false">${book.destination}</textarea>
 </td></tr></table>
 <p class="buttons">
 <input class="cancel" type="reset" value="<%=intl._("Cancel")%>" >
diff --git a/apps/susidns/src/jsp/config.jsp b/apps/susidns/src/jsp/config.jsp
index 23cce5adad..a94e693e54 100644
--- a/apps/susidns/src/jsp/config.jsp
+++ b/apps/susidns/src/jsp/config.jsp
@@ -38,7 +38,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title><%=intl._("configuration")%> - susidns</title>
 <link rel="stylesheet" type="text/css" href="css.css">
 </head>
diff --git a/apps/susidns/src/jsp/details.jsp b/apps/susidns/src/jsp/details.jsp
index 3d59c7dc1f..1f15b67d26 100644
--- a/apps/susidns/src/jsp/details.jsp
+++ b/apps/susidns/src/jsp/details.jsp
@@ -36,7 +36,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>${book.book} <%=intl._("addressbook")%> - susidns</title>
 <link rel="stylesheet" type="text/css" href="css.css">
 </head>
@@ -122,7 +122,7 @@
 <td><%=addr.getNotes()%></td>
 </tr><tr class="list${book.trClass}">
 <td><%=intl._("Destination")%></td>
-<td class="destinations"><textarea rows="1" style="height: 3em;" cols="70" wrap="off" readonly="readonly" ><%=addr.getDestination()%></textarea></td>
+<td class="destinations"><textarea rows="1" style="height:3em;whitespace:nowrap" cols="70" readonly="readonly" ><%=addr.getDestination()%></textarea></td>
 </tr></table>
 </div>
 <div id="buttons">
diff --git a/apps/susidns/src/jsp/subscriptions.jsp b/apps/susidns/src/jsp/subscriptions.jsp
index 8d1c6c2489..c01e2ee08e 100644
--- a/apps/susidns/src/jsp/subscriptions.jsp
+++ b/apps/susidns/src/jsp/subscriptions.jsp
@@ -38,7 +38,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title><%=intl._("subscriptions")%> - susidns</title>
 <link rel="stylesheet" type="text/css" href="css.css">
 </head>
diff --git a/router/java/src/net/i2p/router/transport/TransportManager.java b/router/java/src/net/i2p/router/transport/TransportManager.java
index 8b6b29713d..d0a10f31b5 100644
--- a/router/java/src/net/i2p/router/transport/TransportManager.java
+++ b/router/java/src/net/i2p/router/transport/TransportManager.java
@@ -518,9 +518,9 @@ public class TransportManager implements TransportEventListener {
         buf.append("<h3>").append(_("Definitions")).append("</h3><div class=\"configure\">" +
                    "<p><b id=\"def.peer\">").append(_("Peer")).append("</b>: ").append(_("The remote peer, identified by router hash")).append("<br>\n" +
                    "<b id=\"def.dir\">").append(_("Dir")).append("</b>: " +
-                   "<img src=\"/themes/console/images/inbound.png\"> ").append(_("Inbound connection")).append("<br>\n" +
+                   "<img alt=\"Inbound\" src=\"/themes/console/images/inbound.png\"> ").append(_("Inbound connection")).append("<br>\n" +
                    "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
-                   "<img src=\"/themes/console/images/outbound.png\"> ").append(_("Outbound connection")).append("<br>\n" +
+                   "<img alt=\"Outbound\" src=\"/themes/console/images/outbound.png\"> ").append(_("Outbound connection")).append("<br>\n" +
                    "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
                    "<img src=\"/themes/console/images/inbound.png\" alt=\"V\" height=\"8\" width=\"12\"> ").append(_("They offered to introduce us (help other peers traverse our firewall)")).append("<br>\n" +
                    "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
@@ -531,7 +531,7 @@ public class TransportManager implements TransportEventListener {
                    "<b id=\"def.skew\">").append(_("Skew")).append("</b>: ").append(_("The difference between the peer's clock and your own")).append("<br>\n" +
                    "<b id=\"def.cwnd\">CWND</b>: ").append(_("The congestion window, which is how many bytes can be sent without an acknowledgement")).append(" / <br>\n" +
                    "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ").append(_("The number of sent messages awaiting acknowledgement")).append(" /<br>\n" +
-                   "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ").append(_("The maximum number of concurrent messages to send")).append(" /<br>\n"+ 
+                   "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ").append(_("The maximum number of concurrent messages to send")).append(" /<br>\n"+
                    "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ").append(_("The number of pending sends which exceed congestion window")).append("<br>\n" +
                    "<b id=\"def.ssthresh\">SST</b>: ").append(_("The slow start threshold")).append("<br>\n" +
                    "<b id=\"def.rtt\">RTT</b>: ").append(_("The round trip time in milliseconds")).append("<br>\n" +
-- 
GitLab