Socket
Socket
Sign inDemoInstall

html-entities

Package Overview
Dependencies
0
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.6 to 1.0.7

2

lib/html4-entities.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.4.0
// Generated by CoffeeScript 1.3.3
(function() {

@@ -3,0 +3,0 @@ var Html4Entities;

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.4.0
// Generated by CoffeeScript 1.3.3
(function() {

@@ -3,0 +3,0 @@ var Html5Entities;

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.4.0
// Generated by CoffeeScript 1.3.3
(function() {

@@ -61,20 +61,21 @@

}
return str.replace(/&[a-zA-Z0-9]+;?/g, function(s, ent) {
var a;
if (a = alphaIndex[s]) {
return a;
return str.replace(/&#?[0-9a-zA-Z]+;?/g, function(s) {
var a, code;
if (s.charAt(1) === '#') {
if (s.charAt(2).toLowerCase() === 'x') {
code = parseInt(s.substr(3), 16);
} else {
code = parseInt(s.substr(2));
}
if (isNaN(code) || code < -32768 || code > 65535) {
return '';
}
return String.fromCharCode(code);
} else {
return '';
if (a = alphaIndex[s]) {
return a;
} else {
return '';
}
}
}).replace(/&#[0-9a-fx]+;?/g, function(s) {
var code;
if (s.charAt(2).toLowerCase() === 'x') {
code = parseInt(s.substr(3), 16);
} else {
code = parseInt(s.substr(2));
}
if (isNaN(code) || code < -32768 || code > 65535) {
return '';
}
return String.fromCharCode(code);
});

@@ -81,0 +82,0 @@ };

{
"name": "html-entities",
"version": "1.0.6",
"version": "1.0.7",
"description": "Faster HTML entities encode/decode library.",

@@ -5,0 +5,0 @@ "keywords": [

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