🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@wpe-tkpd/xss

Package Overview
Dependencies
Maintainers
6
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wpe-tkpd/xss - npm Package Compare versions

Comparing version

to
4.2.0

21

dist/__tests__/fixtures/encodeDecodeHtml.d.ts

@@ -1,9 +0,14 @@

declare type Fixture = [
string | undefined | null | number | boolean,
string
];
export declare const fixtures: Fixture[];
export declare const decodeToSingleQuoteFixtures: string[][];
export declare const decodeToDoubleQuoteFixtures: string[][];
export {};
export declare const fixtures: ({
decoded: string;
encoded: string;
} | {
decoded: undefined;
encoded: string;
} | {
decoded: null;
encoded: string;
} | {
decoded: number;
encoded: string;
})[];
//# sourceMappingURL=encodeDecodeHtml.d.ts.map

@@ -15,3 +15,3 @@ /**

*/
export default function decodeHtml(encoded: string): string;
export default function decodeHtml(encoded: unknown): string;
//# sourceMappingURL=decodeHtml.d.ts.map

@@ -9,3 +9,4 @@ "use strict";

function decodeHtml(encoded) {
return encoded.replace(/&gt;/g, '>').replace(/&lt;/g, '<').replace(/&#x27;/g, "'").replace(/&#0?39;/g, "'").replace(/&quot;/g, '"').replace(/&#0?34;/g, '"').replace(/&amp;/g, '&');
var asString = String(encoded);
return asString.replace(/&gt;/g, '>').replace(/&lt;/g, '<').replace(/&#x27;/g, "'").replace(/&#0?39;/g, "'").replace(/&quot;/g, '"').replace(/&#x22;/g, '"').replace(/&#0?34;/g, '"').replace(/&#x26;|&#0?38;|&amp;/g, '&');
}

@@ -30,3 +30,3 @@ /**

*/
export default function encodeHtml(input: any): string;
export default function encodeHtml(input: unknown): string;
//# sourceMappingURL=encodeHtml.d.ts.map
{
"name": "@wpe-tkpd/xss",
"version": "4.1.0",
"version": "4.2.0",
"description": "Various sanitizer, escaper, encoder, and utilities to prevent XSS",

@@ -46,3 +46,3 @@ "sideEffects": false,

"@types/dompurify": "^2.0.4",
"@types/jest": "^27.0.0",
"@types/jest": "^29.0.0",
"@types/jsdom": "^16.2.5",

@@ -54,3 +54,3 @@ "@types/mongo-sanitize": "^1.0.1",

"babel-eslint": "^10.1.0",
"babel-jest": "^27.5.1",
"babel-jest": "^29.0.0",
"babel-plugin-lodash": "^3.3.4",

@@ -64,6 +64,7 @@ "confusing-browser-globals": "^1.0.10",

"eslint-plugin-prettier": "^3.3.0",
"jest": "^27.5.1",
"jest": "^29.0.0",
"jest-environment-jsdom": "^29.0.0",
"lint-staged": "^10.5.3",
"ts-jest": "~27.1.3",
"typescript": "^4.0.0"
"ts-jest": "~29.0.3",
"typescript": "^4.3.0"
},

@@ -70,0 +71,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet