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

xss

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xss - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json

@@ -5,3 +5,3 @@ {

"typings": "./typings/xss.d.ts",
"version": "1.0.3",
"version": "1.0.4",
"description": "Sanitize untrusted HTML (to prevent XSS) with a configuration specified by a Whitelist",

@@ -8,0 +8,0 @@ "author": "Zongmin Lei <leizongmin@gmail.com> (http://ucdok.com)",

@@ -7,5 +7,12 @@ /**

export = XSS;
export as namespace xss;
declare global {
function filterXSS(html: string, options?: XSS.IFilterXSSOptions): string;
}
declare namespace XSS {
export interface IFilterXSSOptions {
interface IFilterXSSOptions {
whiteList?: IWhiteList;

@@ -25,3 +32,3 @@ onTag?: OnTagHandler;

export interface IWhiteList {
interface IWhiteList {
a?: string[];

@@ -92,18 +99,14 @@ abbr?: string[];

export type OnTagHandler = (tag: string, html: string, options: {}) => string | void;
type OnTagHandler = (tag: string, html: string, options: {}) => string | void;
export type OnTagAttrHandler = (tag: string, name: string, value: string, isWhiteAttr: boolean) => string | void;
type OnTagAttrHandler = (tag: string, name: string, value: string, isWhiteAttr: boolean) => string | void;
export type SafeAttrValueHandler = (tag: string, name: string, value: string, cssFilter: ICSSFilter) => string;
type SafeAttrValueHandler = (tag: string, name: string, value: string, cssFilter: ICSSFilter) => string;
export type EscapeHandler = (str: string) => string;
type EscapeHandler = (str: string) => string;
export interface ICSSFilter {
interface ICSSFilter {
process(value: string): string;
}
}
declare module 'xss' {
function StripTagBody(tags: string[], next: () => void): {

@@ -150,6 +153,2 @@ onIgnoreTag(tag: string, html: string, options: {

}
var xss: filterXSS;
export = xss;
}
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