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

xml-sanitizer

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xml-sanitizer - npm Package Compare versions

Comparing version 1.1.6 to 1.1.7

2

index.js

@@ -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 @@

8

package.json
{
"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();
});
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