HTML validation fixes

This commit is contained in:
kytv
2012-03-02 22:32:45 +00:00
parent 1aa24a38a4
commit 2bff0d6bcc
13 changed files with 41 additions and 41 deletions

View File

@ -1554,7 +1554,7 @@ public class I2PSnarkServlet extends Default {
}
out.write("<tr><td>");
out.write(_("I2CP options"));
out.write(": <td><textarea name=\"i2cpOpts\" cols=\"60\" rows=\"1\" style=\"whitespace:nowrap\" spellcheck=\"false\" >"
out.write(": <td><textarea name=\"i2cpOpts\" cols=\"60\" rows=\"1\" wrap=\"off\" spellcheck=\"false\" >"
+ opts.toString() + "</textarea><br>\n" +
"<tr><td>&nbsp;<td><input type=\"submit\" class=\"accept\" value=\"");

View File

@ -52,7 +52,7 @@ public class ConfigClientsHelper extends HelperBase {
if ((mode == 0 && disabled) ||
(mode == 1 && (!disabled) && (!ssl)) ||
(mode == 2 && (!disabled) && ssl))
return "checked=\"true\"";
return "checked=\"checked\"";
return "";
}
@ -60,7 +60,7 @@ public class ConfigClientsHelper extends HelperBase {
public String getAuth() {
boolean enabled = _context.getBooleanProperty(PROP_AUTH);
if (enabled)
return "checked=\"true\"";
return "checked=\"checked\"";
return "";
}
@ -253,9 +253,9 @@ public class ConfigClientsHelper extends HelperBase {
}
buf.append("</td><td align=\"center\" width=\"10%\"><input type=\"checkbox\" class=\"optbox\" name=\"").append(index).append(".enabled\" value=\"true\" ");
if (enabled) {
buf.append("checked=\"true\" ");
buf.append("checked=\"checked\" ");
if (ro)
buf.append("disabled=\"true\" ");
buf.append("disabled=\"disabled\" ");
}
buf.append("></td><td align=\"center\" width=\"15%\">");
// The icons were way too much, so there's an X in each button class,

View File

@ -80,7 +80,7 @@ public class ConfigLoggingHelper extends HelperBase {
String l = levels[i];
buf.append("<option value=\"").append(l).append('\"');
if (l.equals(cur))
buf.append(" selected=\"true\"");
buf.append(" selected=\"selected\"");
buf.append('>').append(_(l)).append("</option>\n");
}
@ -121,7 +121,7 @@ public class ConfigLoggingHelper extends HelperBase {
StringBuilder buf = new StringBuilder(65536);
buf.append("<select name=\"newlogclass\">\n" +
"<option value=\"\" selected=\"true\">")
"<option value=\"\" selected=\"selected\">")
.append(_("Select a class to add"))
.append("</option>\n");

View File

@ -20,8 +20,8 @@ public class ConfigNetHelper extends HelperBase {
public final static String PROP_I2NP_NTCP_PORT = "i2np.ntcp.port";
public final static String PROP_I2NP_NTCP_AUTO_PORT = "i2np.ntcp.autoport";
public final static String PROP_I2NP_NTCP_AUTO_IP = "i2np.ntcp.autoip";
private final static String CHECKED = " checked=\"true\" ";
private final static String DISABLED = " disabled=\"true\" ";
private final static String CHECKED = " checked=\"checked\" ";
private final static String DISABLED = " disabled=\"disabled\" ";
public String getUdphostname() {
return _context.getProperty(UDPTransport.PROP_EXTERNAL_HOST, "");
@ -250,7 +250,7 @@ public class ConfigNetHelper extends HelperBase {
}
buf.append("<option style=\"text-align: right;\" value=\"").append(val).append("\" ");
if (pct == val) {
buf.append("selected=\"true\" ");
buf.append("selected=\"selected\" ");
found = true;
}
buf.append(">").append(val).append("%</option>\n");

View File

@ -56,7 +56,7 @@ public class ConfigReseedHelper extends HelperBase {
if ((mode == 0 && (!disabled) && (!required)) ||
(mode == 1 && (!disabled) && required) ||
(mode == 2 && disabled))
return "checked=\"true\"";
return "checked=\"checked\"";
return "";
}
@ -82,7 +82,7 @@ public class ConfigReseedHelper extends HelperBase {
private String checked(String prop) {
boolean enabled = _context.getBooleanProperty(prop);
if (enabled)
return "checked=\"true\"";
return "checked=\"checked\"";
return "";
}

View File

@ -172,7 +172,7 @@ public class ConfigTunnelsHelper extends HelperBase {
if (!props.isEmpty()) {
buf.append("<tr><td align=\"right\" class=\"mediumtags\">" + _("Inbound options") + ":</td>\n" +
"<td colspan=\"2\" align=\"center\"><input name=\"").append(index);
buf.append(".inboundOptions\" type=\"text\" size=\"32\" disabled=\"true\" " +
buf.append(".inboundOptions\" type=\"text\" size=\"32\" disabled=\"disabled\" " +
"value=\"");
for (Iterator iter = props.keySet().iterator(); iter.hasNext(); ) {
String prop = (String)iter.next();
@ -185,7 +185,7 @@ public class ConfigTunnelsHelper extends HelperBase {
if (!props.isEmpty()) {
buf.append("<tr><td align=\"right\" class=\"mediumtags\">" + _("Outbound options") + ":</td>\n" +
"<td colspan=\"2\" align=\"center\"><input name=\"").append(index);
buf.append(".outboundOptions\" type=\"text\" size=\"32\" disabled=\"true\" " +
buf.append(".outboundOptions\" type=\"text\" size=\"32\" disabled=\"disabled\" " +
"value=\"");
for (Iterator iter = props.keySet().iterator(); iter.hasNext(); ) {
String prop = (String)iter.next();
@ -205,7 +205,7 @@ public class ConfigTunnelsHelper extends HelperBase {
for (int i = min; i <= max; i++) {
buf.append("<option value=\"").append(i).append("\" ");
if (i == now)
buf.append("selected=\"true\" ");
buf.append("selected=\"selected\" ");
buf.append(">").append(ngettext(DUMMY1 + name, DUMMY2 + name + 's', i));
buf.append("</option>\n");
}

View File

@ -14,7 +14,7 @@ public class ConfigUIHelper extends HelperBase {
for (String theme : themes) {
buf.append("<input type=\"radio\" class=\"optbox\" name=\"theme\" ");
if (theme.equals(current))
buf.append("checked=\"true\" ");
buf.append("checked=\"checked\" ");
buf.append("value=\"").append(theme).append("\">").append(_(theme)).append("<br>\n");
}
return buf.toString();
@ -73,7 +73,7 @@ public class ConfigUIHelper extends HelperBase {
// we use "lang" so it is set automagically in CSSHelper
buf.append("<input type=\"radio\" class=\"optbox\" name=\"lang\" ");
if (langs[i].equals(current))
buf.append("checked=\"true\" ");
buf.append("checked=\"checked\" ");
buf.append("value=\"").append(langs[i]).append("\">")
.append("<img height=\"11\" width=\"16\" alt=\"\" src=\"/flags.jsp?c=").append(flags[i]).append("\"> ")
.append(_(xlangs[i])).append("<br>\n");

View File

@ -75,7 +75,7 @@ public class ConfigUpdateHelper extends HelperBase {
public String getUpdateThroughProxy() {
String proxy = _context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY);
if (Boolean.valueOf(proxy).booleanValue())
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateThroughProxy\" checked=\"true\" >";
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateThroughProxy\" checked=\"checked\" >";
else
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateThroughProxy\" >";
}
@ -83,7 +83,7 @@ public class ConfigUpdateHelper extends HelperBase {
public String getUpdateUnsigned() {
String foo = _context.getProperty(ConfigUpdateHandler.PROP_UPDATE_UNSIGNED);
if (Boolean.valueOf(foo).booleanValue())
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateUnsigned\" checked=\"true\" >";
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateUnsigned\" checked=\"checked\" >";
else
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateUnsigned\" >";
}
@ -106,7 +106,7 @@ public class ConfigUpdateHelper extends HelperBase {
for (int i = 0; i < PERIODS.length; i++) {
buf.append("<option value=\"").append(PERIODS[i]);
if (PERIODS[i] == ms)
buf.append("\" selected=\"true");
buf.append("\" selected=\"selected");
if (PERIODS[i] == -1)
buf.append("\">" + _("Never") + "</option>\n");
@ -128,22 +128,22 @@ public class ConfigUpdateHelper extends HelperBase {
buf.append("<option value=\"notify\"");
if ("notify".equals(policy) || _dontInstall)
buf.append(" selected=\"true\"");
buf.append(" selected=\"selected\"");
buf.append('>').append(_("Notify only")).append("</option>");
buf.append("<option value=\"download\"");
if (_dontInstall)
buf.append(" disabled=\"true\"");
buf.append(" disabled=\"disabled\"");
else if ("download".equals(policy))
buf.append(" selected=\"true\"");
buf.append(" selected=\"selected\"");
buf.append('>').append(_("Download and verify only")).append("</option>");
if (_context.hasWrapper()) {
buf.append("<option value=\"install\"");
if (_dontInstall)
buf.append(" disabled=\"true\"");
buf.append(" disabled=\"disabled\"");
else if ("install".equals(policy))
buf.append(" selected=\"true\"");
buf.append(" selected=\"selected\"");
buf.append('>').append(_("Download, verify, and restart")).append("</option>");
}

View File

@ -41,7 +41,7 @@
<input type="radio" class="optbox" name="mode" value="2" <%=reseedHelper.modeChecked(2) %> >
<b><%=intl._("Use non-SSL only")%></b></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._("Reseed URLs")%>:</b></td>
<td><textarea name="reseedURL" wrap="off" spellcheck="false"><jsp:getProperty name="reseedHelper" property="reseedURL" /></textarea></td></tr>
<td><textarea wrap="off" name="reseedURL" cols="60" rows="7" spellcheck="false"><jsp:getProperty name="reseedHelper" property="reseedURL" /></textarea></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._("Enable HTTP Proxy?")%></b></td>
<td><input type="checkbox" class="optbox" name="enable" value="true" <jsp:getProperty name="reseedHelper" property="enable" /> ></td></tr>

View File

@ -56,9 +56,9 @@
<td><input type="text" size="10" name="proxyPort" value="<jsp:getProperty name="updatehelper" property="proxyPort" />" /></td></tr>
<% if (updatehelper.canInstall()) { %>
<tr><td class= "mediumtags" align="right"><b><%=intl._("Update URLs")%>:</b></td>
<td><textarea name="updateURL" wrap="off" spellcheck="false"><jsp:getProperty name="updatehelper" property="updateURL" /></textarea></td>
<td><textarea cols="60" rows="6" name="updateURL" wrap="off" spellcheck="false"><jsp:getProperty name="updatehelper" property="updateURL" /></textarea></td>
</tr><tr><td class= "mediumtags" align="right"><b><%=intl._("Trusted keys")%>:</b></td>
<td><textarea name="trustedKeys" wrap="off" spellcheck="false"><jsp:getProperty name="updatehelper" property="trustedKeys" /></textarea></td>
<td><textarea cols="60" rows="6" name="trustedKeys" wrap="off" spellcheck="false"><jsp:getProperty name="updatehelper" property="trustedKeys" /></textarea></td>
</tr><tr><td class= "mediumtags" align="right"><b><%=intl._("Update with unsigned development builds?")%></b></td>
<td><jsp:getProperty name="updatehelper" property="updateUnsigned" /></td>
</tr><tr><td class= "mediumtags" align="right"><b><%=intl._("Unsigned Build URL")%>:</b></td>

View File

@ -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;whitespace:nowrap" cols="40" readonly="readonly" name="dest_${addr.name}" >${addr.destination}</textarea></td>
<td class="destinations"><textarea rows="1" style="height:3em;" wrap="off" 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;whitespace:nowrap" cols="70" spellcheck="false">${book.destination}</textarea>
<b><%=intl._("Destination")%></b></td><td><textarea name="destination" rows="1" style="height:3em" wrap="off" cols="70" spellcheck="false">${book.destination}</textarea>
</td></tr></table>
<p class="buttons">
<input class="cancel" type="reset" value="<%=intl._("Cancel")%>" >

View File

@ -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;whitespace:nowrap" cols="70" readonly="readonly" ><%=addr.getDestination()%></textarea></td>
<td class="destinations"><textarea rows="1" style="height:3em;" wrap="off" cols="70" readonly="readonly" ><%=addr.getDestination()%></textarea></td>
</tr></table>
</div>
<div id="buttons">

View File

@ -781,7 +781,7 @@ public class Blocklist {
Set<Integer> singles = new TreeSet();
singles.addAll(_singleIPBlocklist);
if (!singles.isEmpty()) {
out.write("<table><tr><th align=center colspan=2><b>");
out.write("<table><tr><th align=\"center\" colspan=\"2\"><b>");
out.write(_("IPs Banned Until Restart"));
out.write("</b></td></tr>");
// first 0 - 127
@ -789,27 +789,27 @@ public class Blocklist {
int ip = ii.intValue();
if (ip < 0)
continue;
out.write("<tr><td align=center width=50%>");
out.write("<tr><td align=\"center\" width=\"50%\">");
out.write(toStr(ip));
out.write("</td><td width=50%>&nbsp;</td></tr>\n");
out.write("</td><td width=\"50%\">&nbsp;</td></tr>\n");
}
// then 128 - 255
for (Integer ii : singles) {
int ip = ii.intValue();
if (ip >= 0)
break;
out.write("<tr><td align=center width=50%>");
out.write("<tr><td align=\"center\" width=\"50%\">");
out.write(toStr(ip));
out.write("</td><td width=50%>&nbsp;</td></tr>\n");
out.write("</td><td width=\"50%\">&nbsp;</td></tr>\n");
}
out.write("</table>");
}
if (_blocklistSize > 0) {
out.write("<table><tr><th align=center colspan=2><b>");
out.write("<table><tr><th align=\"center\" colspan=\"2\"><b>");
out.write(_("IPs Permanently Banned"));
out.write("</b></th></tr><tr><td align=center width=50%><b>");
out.write("</b></th></tr><tr><td align=\"center\" width=\"50%\"><b>");
out.write(_("From"));
out.write("</b></td><td align=center width=50%><b>");
out.write("</b></td><td align=\"center\" width=\"50%\"><b>");
out.write(_("To"));
out.write("</b></td></tr>");
int max = Math.min(_blocklistSize, MAX_DISPLAY);
@ -819,7 +819,7 @@ public class Blocklist {
int from = getFrom(_blocklist[i]);
if (from < 0)
continue;
out.write("<tr><td align=center width=50%>"); out.write(toStr(from)); out.write("</td><td align=center width=50%>");
out.write("<tr><td align=\"center\" width=\"50%\">"); out.write(toStr(from)); out.write("</td><td align=\"center\" width=\"50%\">");
int to = getTo(_blocklist[i]);
if (to != from) {
out.write(toStr(to)); out.write("</td></tr>\n");
@ -832,7 +832,7 @@ public class Blocklist {
int from = getFrom(_blocklist[i]);
if (from >= 0)
break;
out.write("<tr><td align=center width=50%>"); out.write(toStr(from)); out.write("</td><td align=center width=50%>");
out.write("<tr><td align=\"center\" width=\"50%\">"); out.write(toStr(from)); out.write("</td><td align=\"center\" width=\"50%\">");
int to = getTo(_blocklist[i]);
if (to != from) {
out.write(toStr(to)); out.write("</td></tr>\n");