escape-unescape-html-characters

0.1.0 • Public • Published

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


**Release Notes:**

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.

/escape-unescape-html-characters/

    Package Sidebar

    Install

    npm i escape-unescape-html-characters

    Weekly Downloads

    2

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    2.62 kB

    Total Files

    3

    Last publish

    Collaborators

    • ram17