Socket
Socket
Sign inDemoInstall

escape-html

Package Overview
Dependencies
0
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

LICENSE

21

index.js

@@ -0,10 +1,23 @@

/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* MIT Licensed
*/
/**
* Module exports.
* @public
*/
module.exports = escapeHtml;
/**
* Escape special characters in the given string of html.
*
* @param {String} html
* @return {String}
* @api private
* @param {string} str The string to escape for inserting into HTML
* @return {string}
* @public
*/
module.exports = function(html) {
function escapeHtml(html) {
return String(html)

@@ -11,0 +24,0 @@ .replace(/&/g, '&')

26

package.json
{
"name": "escape-html",
"description": "Escape HTML entities",
"version": "1.0.1",
"keywords": ["escape", "html", "utility"],
"dependencies": {},
"main": "index.js",
"component": {
"scripts": {
"escape-html/index.js": "index.js"
}
},
"repository": {
"type": "git",
"url": "https://github.com/component/escape-html.git"
}
"version": "1.0.2",
"license": "MIT",
"keywords": [
"escape",
"html",
"utility"
],
"repository": "component/escape-html",
"files": [
"LICENSE",
"Readme.md",
"index.js"
]
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc