mirror of
https://github.com/plexusorg/Module-HTTPD.git
synced 2024-11-24 12:45:00 +00:00
Update SchematicDownloadEndpoint.java
This commit is contained in:
parent
3fa54cec72
commit
1802d91fad
@ -68,7 +68,10 @@ public class SchematicDownloadEndpoint extends AbstractServlet
|
||||
try
|
||||
{
|
||||
byte[] schemData = HTTPDModule.fileCache.getFile(schemFile);
|
||||
if (schemData != null) outputStream.write(schemData);
|
||||
if (schemData != null)
|
||||
{
|
||||
outputStream.write(schemData);
|
||||
}
|
||||
}
|
||||
catch (IOException ignored)
|
||||
{
|
||||
@ -92,8 +95,9 @@ public class SchematicDownloadEndpoint extends AbstractServlet
|
||||
Arrays.sort(alphabetical);
|
||||
for (File worldeditFile : alphabetical)
|
||||
{
|
||||
String sanitizedName = worldeditFile.getName().replaceAll("<[^>]*>", "");
|
||||
sb.append("<tr>" +
|
||||
"<th scope=\"row\"><a href=\"" + worldeditFile.getName() + "\" download>" + worldeditFile.getName() + "</a></th>" +
|
||||
"<th scope=\"row\"><a href=\"" + worldeditFile.getName() + "\" download>" + sanitizedName + "</a></th>" +
|
||||
"<td>" + formattedSize(worldeditFile.length()) + "</td>" +
|
||||
"</tr>");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user