SmallMlSanitizer sanitizes user input to a small subset of html that is safe for embedding in html documents, xml documents and tsv files.
As far as possible it tries to preserve the user input.
No compiling is needed, and the precompiled grammar file is available as sanitizer.js.
There are no dependencies except for node.
$ echo '<i>invalid <b>string</i>'| node index.js <i>invalid <b>string</i>
As a node module
var sanitizer = require('./sanitizer') sanitizer.parse(txt)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 only.