
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
#xss-escape
Escapes strings for safe insertion into html, and helps prevents cross site scripting attacks.
xss-escape escapes the following characters to their respective html character codes.
##In NodeJS
npm install xss-escape
var xssEscape = require('xss-escape');
var escapedString = xssEscape(unsafeString);
##In the Browser
<script src="path/to/xss-escape.js"></script>
<script>
var escapedString = xssEscape(unsafeString);
</script>
##Can be used with nested objects or arrays.
var escapedObject = xssEscape({ a: 'foo', [{ b: 'bar' }, 'baz' ] });
##Run Tests While in the project's root directory.
npm installnodeunit test.jsor run tests on every file save.
grunt watch##Run Benchmarks While in the project's root directory run.
npm installgrunt benchmarkFAQs
Escapes content for prevention of XSS (Cross Site Scripting) attacks.
The npm package xss-escape receives a total of 295 weekly downloads. As such, xss-escape popularity was classified as not popular.
We found that xss-escape demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.