Reactjs – i'm trying to sanitize but it doesn't work
i'm trying to sanitize html string before sending it into database, i'm using sanitize-html npm package but it doesn't work if (noteContent) { const resultContent = sanitize(noteContent); console.log(resultContent); } else { setErrorMessages((prevState) => ["note content cannot be empty"]); } here…