Free, simple, and intuitive online database diagram editor and SQL generator.
JavaScript databasedatabase-designdatabase-diagramdatabase-schemadbmldiagram-editoreditorer-diagramerderdiagramindexeddbmariadbmcporacle-databaseoracle-dbpostgresqlschema-designsqlsql-serversqlite
Set comment textConent instead of innerHTML to avoid self xss (#882)
1ilit32c130cf00bc
diff --git a/src/utils/utils.js b/src/utils/utils.jsindex 1ea8cbc0..26a654cb 100644--- a/src/utils/utils.js+++ b/src/utils/utils.js@@ -72,7 +72,7 @@ export function getCommentHeight(comment, containerWidth, showComments = true) {span.className = "absolute text-xs px-3 line-clamp-5";span.style.width = containerWidth - borders + "px";- span.innerHTML = comment;+ span.textContent = comment;span.id = "temp-comment-measure";document.body.appendChild(span);