dompurify 2.3.12 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/purify.cjs.js +29 -10
- package/dist/purify.cjs.js.map +1 -1
- package/dist/purify.es.js +29 -10
- package/dist/purify.es.js.map +1 -1
- package/dist/purify.js +29 -10
- package/dist/purify.js.map +1 -1
- package/dist/purify.min.js +2 -2
- package/dist/purify.min.js.map +1 -1
- package/package.json +3 -5
- package/dist/purify.cjs.d.ts +0 -144
- package/dist/purify.es.d.ts +0 -144
package/dist/purify.cjs.d.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
export = purify;
|
|
2
|
-
declare function purify(root: any): {
|
|
3
|
-
(root: any): any;
|
|
4
|
-
/**
|
|
5
|
-
* Version label, exposed for easier checks
|
|
6
|
-
* if DOMPurify is up to date or not
|
|
7
|
-
*/
|
|
8
|
-
version: string;
|
|
9
|
-
/**
|
|
10
|
-
* Array of elements that DOMPurify removed during sanitation.
|
|
11
|
-
* Empty if nothing was removed.
|
|
12
|
-
*/
|
|
13
|
-
removed: any[];
|
|
14
|
-
isSupported: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Sanitize
|
|
17
|
-
* Public method providing core sanitation functionality
|
|
18
|
-
*
|
|
19
|
-
* @param {String|Node} dirty string or DOM node
|
|
20
|
-
* @param {Object} configuration object
|
|
21
|
-
*/
|
|
22
|
-
sanitize(dirty: string | Node, ...args: any[]): any;
|
|
23
|
-
/**
|
|
24
|
-
* Public method to set the configuration once
|
|
25
|
-
* setConfig
|
|
26
|
-
*
|
|
27
|
-
* @param {Object} cfg configuration object
|
|
28
|
-
*/
|
|
29
|
-
setConfig(cfg: any): void;
|
|
30
|
-
/**
|
|
31
|
-
* Public method to remove the configuration
|
|
32
|
-
* clearConfig
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
clearConfig(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Public method to check if an attribute value is valid.
|
|
38
|
-
* Uses last set config, if any. Otherwise, uses config defaults.
|
|
39
|
-
* isValidAttribute
|
|
40
|
-
*
|
|
41
|
-
* @param {string} tag Tag name of containing element.
|
|
42
|
-
* @param {string} attr Attribute name.
|
|
43
|
-
* @param {string} value Attribute value.
|
|
44
|
-
* @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
|
|
45
|
-
*/
|
|
46
|
-
isValidAttribute(tag: string, attr: string, value: string): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* AddHook
|
|
49
|
-
* Public method to add DOMPurify hooks
|
|
50
|
-
*
|
|
51
|
-
* @param {String} entryPoint entry point for the hook to add
|
|
52
|
-
* @param {Function} hookFunction function to execute
|
|
53
|
-
*/
|
|
54
|
-
addHook(entryPoint: string, hookFunction: Function): void;
|
|
55
|
-
/**
|
|
56
|
-
* RemoveHook
|
|
57
|
-
* Public method to remove a DOMPurify hook at a given entryPoint
|
|
58
|
-
* (pops it from the stack of hooks if more are present)
|
|
59
|
-
*
|
|
60
|
-
* @param {String} entryPoint entry point for the hook to remove
|
|
61
|
-
* @return {Function} removed(popped) hook
|
|
62
|
-
*/
|
|
63
|
-
removeHook(entryPoint: string): Function;
|
|
64
|
-
/**
|
|
65
|
-
* RemoveHooks
|
|
66
|
-
* Public method to remove all DOMPurify hooks at a given entryPoint
|
|
67
|
-
*
|
|
68
|
-
* @param {String} entryPoint entry point for the hooks to remove
|
|
69
|
-
*/
|
|
70
|
-
removeHooks(entryPoint: string): void;
|
|
71
|
-
/**
|
|
72
|
-
* RemoveAllHooks
|
|
73
|
-
* Public method to remove all DOMPurify hooks
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
removeAllHooks(): void;
|
|
77
|
-
};
|
|
78
|
-
declare namespace purify {
|
|
79
|
-
const version: string;
|
|
80
|
-
const removed: any[];
|
|
81
|
-
const isSupported: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Sanitize
|
|
84
|
-
* Public method providing core sanitation functionality
|
|
85
|
-
*
|
|
86
|
-
* @param {String|Node} dirty string or DOM node
|
|
87
|
-
* @param {Object} configuration object
|
|
88
|
-
*/
|
|
89
|
-
function sanitize(dirty: string | Node, ...args: any[]): any;
|
|
90
|
-
/**
|
|
91
|
-
* Public method to set the configuration once
|
|
92
|
-
* setConfig
|
|
93
|
-
*
|
|
94
|
-
* @param {Object} cfg configuration object
|
|
95
|
-
*/
|
|
96
|
-
function setConfig(cfg: any): void;
|
|
97
|
-
/**
|
|
98
|
-
* Public method to remove the configuration
|
|
99
|
-
* clearConfig
|
|
100
|
-
*
|
|
101
|
-
*/
|
|
102
|
-
function clearConfig(): void;
|
|
103
|
-
/**
|
|
104
|
-
* Public method to check if an attribute value is valid.
|
|
105
|
-
* Uses last set config, if any. Otherwise, uses config defaults.
|
|
106
|
-
* isValidAttribute
|
|
107
|
-
*
|
|
108
|
-
* @param {string} tag Tag name of containing element.
|
|
109
|
-
* @param {string} attr Attribute name.
|
|
110
|
-
* @param {string} value Attribute value.
|
|
111
|
-
* @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
|
|
112
|
-
*/
|
|
113
|
-
function isValidAttribute(tag: string, attr: string, value: string): boolean;
|
|
114
|
-
/**
|
|
115
|
-
* AddHook
|
|
116
|
-
* Public method to add DOMPurify hooks
|
|
117
|
-
*
|
|
118
|
-
* @param {String} entryPoint entry point for the hook to add
|
|
119
|
-
* @param {Function} hookFunction function to execute
|
|
120
|
-
*/
|
|
121
|
-
function addHook(entryPoint: string, hookFunction: Function): void;
|
|
122
|
-
/**
|
|
123
|
-
* RemoveHook
|
|
124
|
-
* Public method to remove a DOMPurify hook at a given entryPoint
|
|
125
|
-
* (pops it from the stack of hooks if more are present)
|
|
126
|
-
*
|
|
127
|
-
* @param {String} entryPoint entry point for the hook to remove
|
|
128
|
-
* @return {Function} removed(popped) hook
|
|
129
|
-
*/
|
|
130
|
-
function removeHook(entryPoint: string): Function;
|
|
131
|
-
/**
|
|
132
|
-
* RemoveHooks
|
|
133
|
-
* Public method to remove all DOMPurify hooks at a given entryPoint
|
|
134
|
-
*
|
|
135
|
-
* @param {String} entryPoint entry point for the hooks to remove
|
|
136
|
-
*/
|
|
137
|
-
function removeHooks(entryPoint: string): void;
|
|
138
|
-
/**
|
|
139
|
-
* RemoveAllHooks
|
|
140
|
-
* Public method to remove all DOMPurify hooks
|
|
141
|
-
*
|
|
142
|
-
*/
|
|
143
|
-
function removeAllHooks(): void;
|
|
144
|
-
}
|
package/dist/purify.es.d.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
export { purify as default };
|
|
2
|
-
declare function purify(root: any): {
|
|
3
|
-
(root: any): any;
|
|
4
|
-
/**
|
|
5
|
-
* Version label, exposed for easier checks
|
|
6
|
-
* if DOMPurify is up to date or not
|
|
7
|
-
*/
|
|
8
|
-
version: string;
|
|
9
|
-
/**
|
|
10
|
-
* Array of elements that DOMPurify removed during sanitation.
|
|
11
|
-
* Empty if nothing was removed.
|
|
12
|
-
*/
|
|
13
|
-
removed: any[];
|
|
14
|
-
isSupported: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Sanitize
|
|
17
|
-
* Public method providing core sanitation functionality
|
|
18
|
-
*
|
|
19
|
-
* @param {String|Node} dirty string or DOM node
|
|
20
|
-
* @param {Object} configuration object
|
|
21
|
-
*/
|
|
22
|
-
sanitize(dirty: string | Node, ...args: any[]): any;
|
|
23
|
-
/**
|
|
24
|
-
* Public method to set the configuration once
|
|
25
|
-
* setConfig
|
|
26
|
-
*
|
|
27
|
-
* @param {Object} cfg configuration object
|
|
28
|
-
*/
|
|
29
|
-
setConfig(cfg: any): void;
|
|
30
|
-
/**
|
|
31
|
-
* Public method to remove the configuration
|
|
32
|
-
* clearConfig
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
clearConfig(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Public method to check if an attribute value is valid.
|
|
38
|
-
* Uses last set config, if any. Otherwise, uses config defaults.
|
|
39
|
-
* isValidAttribute
|
|
40
|
-
*
|
|
41
|
-
* @param {string} tag Tag name of containing element.
|
|
42
|
-
* @param {string} attr Attribute name.
|
|
43
|
-
* @param {string} value Attribute value.
|
|
44
|
-
* @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
|
|
45
|
-
*/
|
|
46
|
-
isValidAttribute(tag: string, attr: string, value: string): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* AddHook
|
|
49
|
-
* Public method to add DOMPurify hooks
|
|
50
|
-
*
|
|
51
|
-
* @param {String} entryPoint entry point for the hook to add
|
|
52
|
-
* @param {Function} hookFunction function to execute
|
|
53
|
-
*/
|
|
54
|
-
addHook(entryPoint: string, hookFunction: Function): void;
|
|
55
|
-
/**
|
|
56
|
-
* RemoveHook
|
|
57
|
-
* Public method to remove a DOMPurify hook at a given entryPoint
|
|
58
|
-
* (pops it from the stack of hooks if more are present)
|
|
59
|
-
*
|
|
60
|
-
* @param {String} entryPoint entry point for the hook to remove
|
|
61
|
-
* @return {Function} removed(popped) hook
|
|
62
|
-
*/
|
|
63
|
-
removeHook(entryPoint: string): Function;
|
|
64
|
-
/**
|
|
65
|
-
* RemoveHooks
|
|
66
|
-
* Public method to remove all DOMPurify hooks at a given entryPoint
|
|
67
|
-
*
|
|
68
|
-
* @param {String} entryPoint entry point for the hooks to remove
|
|
69
|
-
*/
|
|
70
|
-
removeHooks(entryPoint: string): void;
|
|
71
|
-
/**
|
|
72
|
-
* RemoveAllHooks
|
|
73
|
-
* Public method to remove all DOMPurify hooks
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
removeAllHooks(): void;
|
|
77
|
-
};
|
|
78
|
-
declare namespace purify {
|
|
79
|
-
const version: string;
|
|
80
|
-
const removed: any[];
|
|
81
|
-
const isSupported: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Sanitize
|
|
84
|
-
* Public method providing core sanitation functionality
|
|
85
|
-
*
|
|
86
|
-
* @param {String|Node} dirty string or DOM node
|
|
87
|
-
* @param {Object} configuration object
|
|
88
|
-
*/
|
|
89
|
-
function sanitize(dirty: string | Node, ...args: any[]): any;
|
|
90
|
-
/**
|
|
91
|
-
* Public method to set the configuration once
|
|
92
|
-
* setConfig
|
|
93
|
-
*
|
|
94
|
-
* @param {Object} cfg configuration object
|
|
95
|
-
*/
|
|
96
|
-
function setConfig(cfg: any): void;
|
|
97
|
-
/**
|
|
98
|
-
* Public method to remove the configuration
|
|
99
|
-
* clearConfig
|
|
100
|
-
*
|
|
101
|
-
*/
|
|
102
|
-
function clearConfig(): void;
|
|
103
|
-
/**
|
|
104
|
-
* Public method to check if an attribute value is valid.
|
|
105
|
-
* Uses last set config, if any. Otherwise, uses config defaults.
|
|
106
|
-
* isValidAttribute
|
|
107
|
-
*
|
|
108
|
-
* @param {string} tag Tag name of containing element.
|
|
109
|
-
* @param {string} attr Attribute name.
|
|
110
|
-
* @param {string} value Attribute value.
|
|
111
|
-
* @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
|
|
112
|
-
*/
|
|
113
|
-
function isValidAttribute(tag: string, attr: string, value: string): boolean;
|
|
114
|
-
/**
|
|
115
|
-
* AddHook
|
|
116
|
-
* Public method to add DOMPurify hooks
|
|
117
|
-
*
|
|
118
|
-
* @param {String} entryPoint entry point for the hook to add
|
|
119
|
-
* @param {Function} hookFunction function to execute
|
|
120
|
-
*/
|
|
121
|
-
function addHook(entryPoint: string, hookFunction: Function): void;
|
|
122
|
-
/**
|
|
123
|
-
* RemoveHook
|
|
124
|
-
* Public method to remove a DOMPurify hook at a given entryPoint
|
|
125
|
-
* (pops it from the stack of hooks if more are present)
|
|
126
|
-
*
|
|
127
|
-
* @param {String} entryPoint entry point for the hook to remove
|
|
128
|
-
* @return {Function} removed(popped) hook
|
|
129
|
-
*/
|
|
130
|
-
function removeHook(entryPoint: string): Function;
|
|
131
|
-
/**
|
|
132
|
-
* RemoveHooks
|
|
133
|
-
* Public method to remove all DOMPurify hooks at a given entryPoint
|
|
134
|
-
*
|
|
135
|
-
* @param {String} entryPoint entry point for the hooks to remove
|
|
136
|
-
*/
|
|
137
|
-
function removeHooks(entryPoint: string): void;
|
|
138
|
-
/**
|
|
139
|
-
* RemoveAllHooks
|
|
140
|
-
* Public method to remove all DOMPurify hooks
|
|
141
|
-
*
|
|
142
|
-
*/
|
|
143
|
-
function removeAllHooks(): void;
|
|
144
|
-
}
|