Removed commented and unused code

This commit is contained in:
2023-05-12 09:51:05 +02:00
parent 14fb2d7000
commit 1b39137e32
3 changed files with 10 additions and 46 deletions

View File

@@ -65,28 +65,6 @@ function clearDataField() {
}
/**
* The `escapeHTML` function is used to escape special characters in an HTML element's innerHTML property.
* This is done to prevent these characters from being interpreted as HTML tags or attributes,
* which could potentially cause security vulnerabilities or unintended behavior.
*
* @function
* @name escapeHTML
* @kind function
* @param {any} element
* @returns {void}
*/
function escapeHTML(elementID) {
document.getElementById(elementID).innerHTML = document.getElementById(elementID).innerHTML
.replace(/&/g, "&")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
}
/**
* It fills the XML area with a sample XML.
*
@@ -111,6 +89,16 @@ function fillDefaultXML(element) {
}
}
/**
* It fills the XSD area with a sample XSD and XML area with matching XML.
*
* @function
* @name fillDefaultXSD
* @kind function
* @param {any} element
* @returns {void}
*/
function fillDefaultXSD(){
const serverAddress = window.location.protocol + "//" + window.location.hostname + ":8086";
fetch(serverAddress + "/assets/samples/sampleXSD.xsd")