mirror of
https://github.com/codex-team/editor.js
synced 2024-06-01 21:42:26 +02:00
Fix sanitize config on paste (#471)
This commit is contained in:
parent
ad75ceaf05
commit
53f58584b6
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.1.1",
|
||||
"version": "2.1.2",
|
||||
"description": "Codex Editor. Native JS, based on API and Open Source",
|
||||
"main": "build/codex-editor.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -147,7 +147,7 @@ export default class Paste extends Module {
|
|||
return result;
|
||||
}, {});
|
||||
|
||||
const customConfig = {tags: Object.assign({}, toolsTags, Sanitizer.defaultConfig.tags)};
|
||||
const customConfig = Object.assign({}, toolsTags, Sanitizer.defaultConfig.tags);
|
||||
const cleanData = Sanitizer.clean(htmlData, customConfig);
|
||||
|
||||
/** If there is no HTML or HTML string is equal to plain one, process it as plain text */
|
||||
|
@ -515,7 +515,7 @@ export default class Paste extends Module {
|
|||
|
||||
return result;
|
||||
}, {});
|
||||
const customConfig = {tags: Object.assign({}, toolTags, Sanitizer.defaultConfig.tags)};
|
||||
const customConfig = Object.assign({}, toolTags, Sanitizer.defaultConfig.tags);
|
||||
|
||||
content.innerHTML = Sanitizer.clean(content.innerHTML, customConfig);
|
||||
|
||||
|
|
Loading…
Reference in a new issue