xml-sanitizer
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -0,1 +1,2 @@ | ||
/* eslint no-control-regex: "off" */ | ||
// A list of invalid XML characters can be found at https://www.w3.org/TR/2000/REC-xml-20001006#NT-Char | ||
@@ -5,2 +6,3 @@ // Originally found via http://www-01.ibm.com/support/docview.wss?uid=swg21514211&aid=1 | ||
var stripAnsi = require('strip-ansi'); | ||
var BAD_JUJU = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007f-\u0084\u0086-\u009f\uD800-\uDFFF\uFDD0-\uFDFF\uFFFF\uC008]/g; | ||
@@ -7,0 +9,0 @@ |
{ | ||
"name": "xml-sanitizer", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "Sanitize out invalid xml characters from your strings", | ||
"main": "index.js", | ||
"repository": "https://github.com/TheAlphaNerd/xml-sanitizer", | ||
"repository": "https://github.com/MylesBorins/xml-sanitizer", | ||
"scripts": { | ||
@@ -18,5 +18,5 @@ "test": "npm run lint && npm run tap", | ||
"devDependencies": { | ||
"eslint": "^3.0.1", | ||
"tap": "^6.1.1" | ||
"eslint": "^7.31.0", | ||
"tap": "^15.0.9" | ||
} | ||
} |
@@ -83,3 +83,3 @@ 'use strict'; | ||
invalidCharacters.forEach(function(char) { | ||
t.equals(xmlSanitizer(char), '', 'it should return an empty string'); | ||
t.equal(xmlSanitizer(char), '', 'it should return an empty string'); | ||
}); | ||
@@ -91,3 +91,3 @@ t.end(); | ||
invalidCharacters.forEach(function(char) { | ||
t.equals(xmlSanitizer(char + '\u0000\u0000'), '', 'it should return an empty string'); | ||
t.equal(xmlSanitizer(char + '\u0000\u0000'), '', 'it should return an empty string'); | ||
}); | ||
@@ -99,3 +99,3 @@ t.end(); | ||
invalidCharacters.forEach(function(char) { | ||
t.equals(xmlSanitizer(char, '🎉'), '🎉', 'it should return 🎉'); | ||
t.equal(xmlSanitizer(char, '🎉'), '🎉', 'it should return 🎉'); | ||
}); | ||
@@ -107,4 +107,4 @@ t.end(); | ||
var text = 'Why oh why do you do this to me'; | ||
t.equals(xmlSanitizer(text), text, 'it should return the original text'); | ||
t.equal(xmlSanitizer(text), text, 'it should return the original text'); | ||
t.end(); | ||
}); |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
5011
108
1