A small library for an sanitising input fields from dangerous inputs.
npm i sanitise-fields
<script src="https://unpkg.com/sanitise-fields/dist/index.min.js"></script>
Add the class sanitise
to your input element
index.html
<input type="text" id="txtComment" class="sanitise">
index.js
import { sanitise } from 'sanitise-fields'
sanitise()