mirror of
https://github.com/pi-hole/web.git
synced 2025-12-26 13:36:22 +00:00
Fix invalid HTML code generated using javascript
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
@@ -11,13 +11,13 @@
|
||||
function addAllowedValues(allowed) {
|
||||
if (typeof allowed === "object") {
|
||||
return (
|
||||
"<p>Available options: <ul><li>" +
|
||||
"<p>Available options:</p><ul><li>" +
|
||||
allowed
|
||||
.map(function (option) {
|
||||
return "<code>" + option.item + "</code>: " + utils.escapeHtml(option.description);
|
||||
})
|
||||
.join("</li><li>") +
|
||||
"</li></ul></p>"
|
||||
"</li></ul>"
|
||||
);
|
||||
} else if (typeof allowed === "string") {
|
||||
return "<p><small>Allowed value: " + utils.escapeHtml(allowed) + "</small></p>";
|
||||
|
||||
@@ -49,12 +49,12 @@ function importZIP() {
|
||||
} else if ("files" in data) {
|
||||
$("#modal-import-success").show();
|
||||
$("#modal-import-success-title").text("Import successful");
|
||||
var text = "<p>Processed files:<ul>";
|
||||
var text = "<p>Processed files:</p><ul>";
|
||||
for (var i = 0; i < data.files.length; i++) {
|
||||
text += "<li>/" + utils.escapeHtml(data.files[i]) + "</li>";
|
||||
}
|
||||
|
||||
text += "</ul></p>";
|
||||
text += "</ul>";
|
||||
$("#modal-import-success-message").html(text);
|
||||
$("#modal-import-gravity").show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user