Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ent

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ent - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

11

encode.js

@@ -10,7 +10,2 @@ var punycode = require('punycode');

}
var special = {
'"': true, "'": true,
'<': true, '>': true,
'&': true
};
if (!opts) opts = {};

@@ -22,2 +17,8 @@

var special = opts.special || {
'"': true, "'": true,
'<': true, '>': true,
'&': true
};
var codePoints = punycode.ucs2.decode(str);

@@ -24,0 +25,0 @@ var chars = [];

{
"name" : "ent",
"description" : "Encode and decode HTML entities",
"version" : "2.1.1",
"version" : "2.2.0",
"repository" : "https://github.com/substack/node-ent.git",

@@ -6,0 +6,0 @@ "author" : "James Halliday <mail@substack.net> (http://substack.net)",

@@ -87,1 +87,16 @@ var test = require('tape');

});
test('encode `special` option', function (t) {
var a = '<>\'"&';
var b = '&lt;&gt;\'"&amp;';
t.equal(ent.encode(a, {
named: true,
special: {
'<': true,
'>': true,
'&': true
}
}), b);
t.end();
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc