Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new sanitize method #103

Merged
merged 13 commits into from
Jan 10, 2017
Merged

new sanitize method #103

merged 13 commits into from
Jan 10, 2017

Conversation

khaydarov
Copy link
Member

Need to fix caret position

@@ -224,6 +234,8 @@ var callbacks = (function(callbacks) {

callbacks.redactorClicked = function (event) {

callbacks.isClickedOnFirstLevelBlockArea();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

название должно четко соответствовать поведению: сейчас выглядит как будто функция возвращает булен

* clicked in redactor area
* @type {null | Boolean}
*/
content.editorArea = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

editorAreaHighlighted

@@ -517,7 +557,7 @@ var content = (function(content) {
tool = workingNode.dataset.tool;

if (codex.tools[tool].allowedToPaste) {
codex.content.sanitize(mutation.addedNodes);
(codex.content.sanitize.bind(this, mutation.addedNodes))();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call

mutations.forEach(codex.content.paste);

var self = this,
callback;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused var

* For that, we need to send Context, MutationObserver.__proto__ that contains
* observer disconnect method.
*/
console.warn('mutations count: %o', mutations.length);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove log

@@ -545,92 +585,70 @@ var content = (function(content) {
*
* Sanitizes HTML content
* @param {Element} target - inserted element
* @uses DFS function for deep searching
* @uses Sanitize library and BASIC configuration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basic не используется

var sanitizer = new janitor(Config),
clear = sanitizer.clean(node.outerHTML);

var newFragment = document.createElement('DIV');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это больше не фрагмент

*/
block.addEventListener('paste', function (event) {
codex.callback.blockPaste(event);
codex.callback._blockPaste(event);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove _blockPaste

@neSpecc neSpecc merged commit f5c5501 into versioning Jan 10, 2017
@neSpecc neSpecc deleted the sanitize branch January 10, 2017 16:59
neSpecc pushed a commit that referenced this pull request Jan 10, 2017
* start versioning

* codex.version

* eslint settings

* versioning improved

* cover restoring and fetch function fixed (#101)

* cover restoring fixed

* upd

* fetch fixed in safari

* updated

* plugins

* plugins ready

* code improved

* fixed bug with backspace

* improved architecture

* new sanitize method (#103)

* new sanitize method

Need to fix caret position

* removed console logs

* version updated

* eslint style

* caret position

* big fixed on sanitize method

* sanitize improved, using observers

* sanitize: using html-janitor

* fixes

* last fixes, code improved after review

* updated

* new bundle

* webpack config improved

* upd

* upd

* upd
neSpecc pushed a commit that referenced this pull request Jan 10, 2017
#105)

* cover restoring fixed

* upd

* fetch fixed in safari

* updated

* plugins

* plugins ready

* code improved

* fixed bug with backspace

* improved architecture

* Versioning (#102)

* start versioning

* codex.version

* eslint settings

* versioning improved

* cover restoring and fetch function fixed (#101)

* cover restoring fixed

* upd

* fetch fixed in safari

* updated

* plugins

* plugins ready

* code improved

* fixed bug with backspace

* improved architecture

* new sanitize method (#103)

* new sanitize method

Need to fix caret position

* removed console logs

* version updated

* eslint style

* caret position

* big fixed on sanitize method

* sanitize improved, using observers

* sanitize: using html-janitor

* fixes

* last fixes, code improved after review

* updated

* new bundle

* webpack config improved

* upd

* upd

* upd

* upd

* clear from conflicts

* upd

* upd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants