mirror of
https://github.com/codex-team/editor.js
synced 2024-05-19 23:06:49 +02:00
Fix plugin int return data (#487)
* Fix plugin int return data * clean only strings * Increase version
This commit is contained in:
parent
d6f85bd08d
commit
4a27dc6766
|
@ -59,7 +59,7 @@
|
|||
"camelcase": [2, {
|
||||
"properties": "always"
|
||||
}],
|
||||
"newline-after-var": [1, "always"],
|
||||
"newline-after-var": [1, "always"]
|
||||
|
||||
},
|
||||
"globals":{
|
||||
|
@ -79,10 +79,12 @@
|
|||
"Module": true,
|
||||
"Node": true,
|
||||
"Element": true,
|
||||
"DocumentFragment": true,
|
||||
"Proxy": true,
|
||||
"Symbol": true,
|
||||
"$": true,
|
||||
"_": true,
|
||||
"setTimeout": true
|
||||
"setTimeout": true,
|
||||
"Map": true
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "codex.editor",
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"description": "Codex Editor. Native JS, based on API and Open Source",
|
||||
"main": "build/codex-editor.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -114,8 +114,13 @@ export default class Sanitizer extends Module {
|
|||
} else {
|
||||
/**
|
||||
* Primitives (number|string|boolean): clean this item
|
||||
*
|
||||
* Clean only strings
|
||||
*/
|
||||
return this.cleanOneItem(dataToSanitize, rules);
|
||||
if (typeof dataToSanitize === 'string') {
|
||||
return this.cleanOneItem(dataToSanitize, rules);
|
||||
}
|
||||
return dataToSanitize;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,10 +128,10 @@ export default class Sanitizer extends Module {
|
|||
* Cleans string from unwanted tags
|
||||
* Method allows to use default config
|
||||
*
|
||||
* @param {String} taintString - taint string
|
||||
* @param {string} taintString - taint string
|
||||
* @param {SanitizerConfig} customConfig - allowed tags
|
||||
*
|
||||
* @return {String} clean HTML
|
||||
* @return {string} clean HTML
|
||||
*/
|
||||
public clean(taintString: string, customConfig: ISanitizerConfig = {}): string {
|
||||
|
||||
|
|
Loading…
Reference in a new issue