Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 20, 2024 via pnpm

escape-html 1.0.3

Escape string for use in HTML
Package summary
Share
0
issues
1
license
1
MIT
Package created
20 Aug 2012
Version published
1 Sep 2015
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
escape-html@1.0.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of escape-html 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does escape-html do?

The "escape-html" is a popular npm package utilized for escaping strings for use in HTML. This tool is hugely beneficial in preventing cross-site scripting (XSS) attacks by sanitizing user input. By replacing special characters in strings with corresponding HTML entities, it helps to neutralize any possible injected malicious scripts.

How do you use escape-html?

To use the "escape-html" npm package in your JavaScript project, you first need to install it using npm with the command below in your terminal:

npm install escape-html

Following installation, you can import and use it to escape any string for HTML. Here's an example of how to use it in your code:

var escape = require('escape-html');
var html = escape('foo & bar');
console.log(html);
// Output: foo & bar

In the code snippet above, you are escaping the string 'foo & bar', and the package replaces the '&' character with the corresponding HTML entity '&'.

Where are the escape-html docs?

The documentation for the "escape-html" npm package can be found on the package's GitHub page. Although the README provided there is brief, it explains what the package does and gives an example of how to use it. For more complex or specific use-cases, you might have to rely on external resources, articles, tutorials, or forums that deal with the package. The link to the GitHub page is https://github.com/component/escape-html.