editor.js/docs/sanitizer.md
Murod Khaydarov ff80ca6e92
api sanitizer improvements (#457)
* api sanitizer improvements

* update

* sanitize recursively

* clear from logs and update comments

* optimize

* update

* perfect recursive method

* update request

* upd

* update docs

* update comments

* update

* update docs

* update last comment

* update

* update docs

* update docs

* update

* upd docs

* add extra condition

* update

* update docs link
2018-10-01 14:07:51 +03:00

1 KiB

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

Sanitizer class implements basic Module class that holds User configuration and default CodeX Editor instances

Properties

Default Editor Sanitizer configuration according to the html-janitor API

defaultConfig

Custom User configuration which passed on Editor initialization. Data type must be according to the html-janitor API

sanitizerConfig

Property that holds an instance used in Module

sanitizerInstance

Methods

clean

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)