Skip to content
Snippets Groups Projects
Commit adcf1fbd authored by Vincent Massol's avatar Vincent Massol
Browse files

[Misc] Fix some Sonarqube-reported violations

parent 4eaa5ba0
No related branches found
No related tags found
No related merge requests found
......@@ -408,14 +408,16 @@ public void export(XWikiContext context) throws IOException, XWikiException
private void generateIndexPage(ZipOutputStream zos, XWikiContext context) throws IOException
{
StringBuilder builder = new StringBuilder();
builder.append("<!DOCTYPE HTML>\n"
+ "<html lang=\"en-US\">\n"
+ " <head>\n"
+ " <meta charset=\"UTF-8\">\n"
+ " <title>Export Index</title>\n"
+ " </head>\n"
+ " <body>\n"
+ " <ul>\n");
builder.append("""
<!DOCTYPE HTML>
<html lang=\"en-US\">
<head>
<meta charset=\"UTF-8\">
<title>Export Index</title>
</head>
<body>
<ul>
""");
for (DocumentReference reference : this.pageReferences) {
builder.append(" <li><a href=\"");
......@@ -430,9 +432,11 @@ private void generateIndexPage(ZipOutputStream zos, XWikiContext context) throws
builder.append("</a></li>\n");
}
builder.append(" </ul>\n"
+ " </body>\n"
+ "</html>\n");
builder.append("""
</ul>
</body>
</html>
""");
ZipEntry zipentry = new ZipEntry("index.html");
zos.putNextEntry(zipentry);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment