Comparing version 1.0.3 to 1.0.4
@@ -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; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137905
2523