mirror of
https://github.com/codex-team/editor.js
synced 2024-06-01 13:32:43 +02:00
23 lines
581 B
Markdown
23 lines
581 B
Markdown
|
# CodeX Editor Sanitizer Module
|
||
|
|
||
|
The `Sanitizer` module represents a set of methods that clears taint strings.
|
||
|
Uses lightweight npm package with simple API [html-janitor](https://www.npmjs.com/package/html-janitor)
|
||
|
|
||
|
## Methods
|
||
|
|
||
|
### clean
|
||
|
|
||
|
```javascript
|
||
|
clean(taintString, customConfig)
|
||
|
```
|
||
|
|
||
|
> Cleans up the passed taint string
|
||
|
|
||
|
#### params
|
||
|
|
||
|
| Param | Type | Description|
|
||
|
| -------------|------ |:-------------:|
|
||
|
| taintString | String | string that needs to be cleaned|
|
||
|
| customConfig | Object | Can be passed new config per usage (Default: uses default configuration)|
|
||
|
|