Comparing version 2.1.0 to 2.1.1
@@ -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 = '<html> © π " ''; | ||
var a = '<html> © π " \' ∴ Β β'; | ||
var b = '<html> © π " ' ∴ Β β'; | ||
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'; | ||
var c = '• &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'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97318
3728
1