Skip to content

Commit bd070c0

Browse files
committed
use textContent instead of innerHTML for table cells
1 parent 790c614 commit bd070c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

debugging/book-library/script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ function render() {
7979
let pagesCell = row.insertCell(2);
8080
let wasReadCell = row.insertCell(3);
8181
let deleteCell = row.insertCell(4);
82-
titleCell.innerHTML = myLibrary[i].title;
83-
authorCell.innerHTML = myLibrary[i].author;
84-
pagesCell.innerHTML = myLibrary[i].pages;
82+
titleCell.textContent = myLibrary[i].title;
83+
authorCell.textContent = myLibrary[i].author;
84+
pagesCell.textContent = String(myLibrary[i].pages);
8585

8686
//add and wait for action for read/unread button
8787
let changeBut = document.createElement("button");

0 commit comments

Comments
 (0)