Skip to content

Commit

Permalink
Make safer with innerText
Browse files Browse the repository at this point in the history
  • Loading branch information
YanivZalach committed Jan 25, 2024
1 parent c9fdf32 commit f12b4e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function outCsvFile(file,resultElement){
cell = document.createElement('td'); // List element
}
// Adding the data
cell.innerHTML = file[row][column];
cell.innerText = file[row][column];
print(file[row][column])
// Appending to the list
table_row.appendChild(cell);
Expand Down Expand Up @@ -51,7 +51,7 @@ export function addNameH2(name,resultElement){
print(name);
const h2 = document.createElement('h2'); // Creating h2 element
h2.id = name; // Adding an id
h2.innerHTML = name; // Adding the name to the element
h2.innerText = name; // Adding the name to the element
resultElement.appendChild(h2); // Adding the element to the dom
} else { // Didn't got a name
print("Name not given");
Expand Down

0 comments on commit f12b4e1

Please sign in to comment.