mirror of https://github.com/zlatinb/muwire
layout and escaping, thanks zzz
parent
9b2669a8b8
commit
bc628b9c00
|
@ -185,7 +185,7 @@ iframe {
|
|||
display: inline-block;
|
||||
font-size: 1.4em;
|
||||
padding: 0 0 22px 28px;
|
||||
width: 212px;
|
||||
width: 300px;
|
||||
}
|
||||
.pagetitle {
|
||||
display: inline-block;
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package com.muwire.webui;
|
||||
|
||||
public class Util {
|
||||
|
||||
private static final String escapeChars[] = {"&", "\"", "<", ">", "'"};
|
||||
private static final String escapeCodes[] = {"&amp;", "&quot;", "&lt;", "&gt;", "&apos;"};
|
||||
|
||||
/**
|
||||
* Double-Escape an HTML string for inclusion in XML
|
||||
* @param unescaped the unescaped string, may be null
|
||||
* @return the escaped string, or null if null is passed in
|
||||
*/
|
||||
public static String escapeHTMLinXML(String unescaped) {
|
||||
if (unescaped == null) return null;
|
||||
String escaped = unescaped;
|
||||
for (int i = 0; i < escapeChars.length; i++) {
|
||||
escaped = escaped.replace(escapeChars[i], escapeCodes[i]);
|
||||
}
|
||||
return escaped;
|
||||
}
|
||||
}
|
|
@ -19,13 +19,16 @@
|
|||
</head>
|
||||
<body onload="initConnectionsCount(); initDownloads();">
|
||||
<%@include file="header.jsi"%>
|
||||
<p>Downloads:</p>
|
||||
|
||||
<aside>
|
||||
<h3>Downloads</h3>
|
||||
</aside>
|
||||
<section class="main foldermain">
|
||||
<div id="table-wrapper">
|
||||
<div id="downloads"></div>
|
||||
</div>
|
||||
<hr/>
|
||||
<p>Download Details</p>
|
||||
<div id="downloadDetails"><p>Click on a download to view details</p></div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -27,84 +27,35 @@
|
|||
<body onload="initConnectionsCount();initGroupByFile();">
|
||||
<% } %>
|
||||
<%@include file="header.jsi"%>
|
||||
<aside>
|
||||
<% if (groupBy.equals("sender")) { %>
|
||||
<center><a href="/MuWire/Home.jsp?groupBy=file">Group By File</a></center>
|
||||
<h3>Active Searches By Sender</h3>
|
||||
<a href="Home.jsp?groupBy=file">Group By File</a>
|
||||
<% } else { %>
|
||||
<center><a href="/MuWire/Home.jsp?groupBy=sender">Group By Sender</a></center>
|
||||
<h3>Active Searches By File</h3>
|
||||
<a href="Home.jsp?groupBy=sender">Group By Sender</a>
|
||||
<% } %>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="20%">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<th>
|
||||
Active Searches
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<div id="table-wrapper">
|
||||
<div id="table-scroll">
|
||||
<div id="activeSearches"></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="table-wrapper">
|
||||
<div id="table-scroll">
|
||||
<div id="unused"></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="80%">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<th>
|
||||
<span id="currentSearch">Results</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</aside>
|
||||
<section class="main foldermain">
|
||||
<h3><span id="currentSearch">Results</span></h3>
|
||||
<div id="table-wrapper">
|
||||
<div id="table-scroll">
|
||||
<div id="topTable"></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<span id="resultsFrom"></span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<h3><span id="resultsFrom"></span></h3>
|
||||
<div id="table-wrapper">
|
||||
<div id="table-scroll">
|
||||
<div id="bottomTable">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue