0.1.0 • Published 4 years ago

escape-unescape-html-characters v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Thanks for checking out the package.

USAGE:

Add the package to your project by using:

npm i escape-unescape-html-characters

Import the package wherever you need and use it like this:

const packageModule = require('escape-unescape-html-characters');

console.log(packageModule.escapeHtml('<script>alert("1")</script>'));
// returns &lt;script&gt;alert(&quot;1&quot;)&lt;/script&gt;

console.log(packageModule.unescapeHtml('&lt;script&gt;alert(&quot;1&quot;)&lt;/script&gt;'));
// returns <script>alert("1")</script>

GitHub: https://github.com/ram170/escape-unescape-html NPM package: https://www.npmjs.com/package/escape-unescape-html-characters

v0.0.1 - Initial commit and doesn't provide support to few symbols(" and ') while escaping. This can be used if you only want to escape < and > v0.1.0 - Provided support for those symbols and added Readme.