mirror of https://github.com/zlatinb/muwire
layout and escaping, thanks zzz
parent
9b2669a8b8
commit
bc628b9c00
|
@ -185,7 +185,7 @@ iframe {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
padding: 0 0 22px 28px;
|
padding: 0 0 22px 28px;
|
||||||
width: 212px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
.pagetitle {
|
.pagetitle {
|
||||||
display: inline-block;
|
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>
|
</head>
|
||||||
<body onload="initConnectionsCount(); initDownloads();">
|
<body onload="initConnectionsCount(); initDownloads();">
|
||||||
<%@include file="header.jsi"%>
|
<%@include file="header.jsi"%>
|
||||||
<p>Downloads:</p>
|
<aside>
|
||||||
|
<h3>Downloads</h3>
|
||||||
|
</aside>
|
||||||
|
<section class="main foldermain">
|
||||||
<div id="table-wrapper">
|
<div id="table-wrapper">
|
||||||
<div id="downloads"></div>
|
<div id="downloads"></div>
|
||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
<p>Download Details</p>
|
<p>Download Details</p>
|
||||||
<div id="downloadDetails"><p>Click on a download to view details</p></div>
|
<div id="downloadDetails"><p>Click on a download to view details</p></div>
|
||||||
|
</section>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -27,84 +27,35 @@
|
||||||
<body onload="initConnectionsCount();initGroupByFile();">
|
<body onload="initConnectionsCount();initGroupByFile();">
|
||||||
<% } %>
|
<% } %>
|
||||||
<%@include file="header.jsi"%>
|
<%@include file="header.jsi"%>
|
||||||
|
<aside>
|
||||||
<% if (groupBy.equals("sender")) { %>
|
<% 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 { %>
|
<% } 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-wrapper">
|
||||||
<div id="table-scroll">
|
<div id="table-scroll">
|
||||||
<div id="activeSearches"></div>
|
<div id="activeSearches"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</aside>
|
||||||
</tr>
|
<section class="main foldermain">
|
||||||
<tr>
|
<h3><span id="currentSearch">Results</span></h3>
|
||||||
<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>
|
|
||||||
<div id="table-wrapper">
|
<div id="table-wrapper">
|
||||||
<div id="table-scroll">
|
<div id="table-scroll">
|
||||||
<div id="topTable"></div>
|
<div id="topTable"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
<h3><span id="resultsFrom"></span></h3>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table width="100%">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<span id="resultsFrom"></span>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div id="table-wrapper">
|
<div id="table-wrapper">
|
||||||
<div id="table-scroll">
|
<div id="table-scroll">
|
||||||
<div id="bottomTable">
|
<div id="bottomTable">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</section>
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue