Socket
Socket
Sign inDemoInstall

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.0 to 2.1.1

2

decode.js

@@ -28,3 +28,3 @@ var punycode = require('punycode');

} else {
return '$' + withoutSemi + ';';
return '&' + match;
}

@@ -31,0 +31,0 @@ }

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

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

@@ -22,4 +22,4 @@ var test = require('tape');

test('html named', function (t) {
var a = '<html> © π " \'';
var b = '&lt;html&gt; &copy; &pi; &quot; &apos;';
var a = '<html> © π " \' ∴ Β β';
var b = '&lt;html&gt; &copy; &pi; &quot; &apos; &therefore; &Beta; &beta;';
t.equal(ent.encode(a, { named: true }), b);

@@ -30,2 +30,12 @@ t.equal(ent.decode(b), a);

test('ambiguous ampersands', function (t) {
var a = '• &bullet';
var b = '&bullet; &bullet';
var c = '&bullet; &amp;bullet';
t.equal(ent.encode(a, { named: true }), c);
t.equal(ent.decode(b), a);
t.equal(ent.decode(c), a);
t.end();
});
test('entities', function (t) {

@@ -32,0 +42,0 @@ var a = '\u2124';

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