Skip to content

Commit

Permalink
Move the sanitizeHtml config to the proper place in all tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dumluregn committed Sep 3, 2024
1 parent 2f459dd commit 897e424
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions packages/ckeditor5-clipboard/tests/manual/dragdrop-blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ ClassicEditor
}
},
htmlEmbed: {
showPreviews: true,
sanitizeHtml: html => ( { html, hasChange: false } )
showPreviews: true
},
sanitizeHtml: html => ( { html, hasChange: false } ),
list: {
properties: {
styles: true,
Expand Down
20 changes: 10 additions & 10 deletions packages/ckeditor5-html-embed/tests/manual/htmlembed.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ async function startEnabledPreviewsMode( config ) {
await reloadEditor( {
...config,
htmlEmbed: {
showPreviews: true,
sanitizeHtml( rawHtml ) {
const config = getSanitizeHtmlConfig( sanitizeHtml.defaults );
const cleanHtml = sanitizeHtml( rawHtml, config );

return {
html: cleanHtml,
hasChanged: rawHtml !== cleanHtml
};
}
showPreviews: true
},
sanitizeHtml( rawHtml ) {
const config = getSanitizeHtmlConfig( sanitizeHtml.defaults );
const cleanHtml = sanitizeHtml( rawHtml, config );

return {
html: cleanHtml,
hasChanged: rawHtml !== cleanHtml
};
}
} );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1064,9 +1064,9 @@ describe( 'ImageResizeHandles', () => {
editor = await createEditor( {
plugins: [ Image, ImageResizeEditing, ImageResizeHandles, HtmlEmbedEditing ],
htmlEmbed: {
showPreviews: true,
sanitizeHtml: input => ( { html: input, hasChanged: false } )
}
showPreviews: true
},
sanitizeHtml: input => ( { html: input, hasChanged: false } )
} );

const attachToSpy = sinon.spy( editor.plugins.get( 'WidgetResize' ), 'attachTo' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ ClassicEditor
},
placeholder: 'Type the content here!',
htmlEmbed: {
showPreviews: true,
sanitizeHtml: html => ( { html, hasChange: false } )
}
showPreviews: true
},
sanitizeHtml: html => ( { html, hasChange: false } )
} ),
list: {
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ const config = {
},
placeholder: 'Type the content here!',
htmlEmbed: {
showPreviews: true,
sanitizeHtml: html => ( { html, hasChange: false } )
showPreviews: true
},
sanitizeHtml: html => ( { html, hasChange: false } ),
menuBar: {
isVisible: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ ClassicEditor
cloudServices: CS_CONFIG,
placeholder: 'Type the content here!',
htmlEmbed: {
showPreviews: true,
sanitizeHtml: html => ( { html, hasChange: false } )
}
showPreviews: true
},
sanitizeHtml: html => ( { html, hasChange: false } )
} ),
list: {
properties: {
Expand Down
6 changes: 3 additions & 3 deletions packages/ckeditor5-list/tests/manual/documentlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ ClassicEditor
},
placeholder: 'Type the content here!',
htmlEmbed: {
showPreviews: true,
sanitizeHtml: html => ( { html, hasChange: false } )
}
showPreviews: true
},
sanitizeHtml: html => ( { html, hasChange: false } )
} )
.then( editor => {
window.editor = editor;
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-style/tests/manual/styledropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ const config = {
}
},
htmlEmbed: {
showPreviews: true,
sanitizeHtml: html => ( { html, hasChange: false } )
showPreviews: true
},
sanitizeHtml: html => ( { html, hasChange: false } ),
list: {
properties: {
styles: true,
Expand Down
4 changes: 2 additions & 2 deletions tests/manual/all-features.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ ClassicEditor
}
},
htmlEmbed: {
showPreviews: true,
sanitizeHtml: html => ( { html, hasChange: false } )
showPreviews: true
},
sanitizeHtml: html => ( { html, hasChange: false } ),
list: {
properties: {
styles: true,
Expand Down
6 changes: 3 additions & 3 deletions tests/manual/memory/memory-semi-automated.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ function initEditor() {
}
},
htmlEmbed: {
showPreviews: true,
sanitizeHtml: html => ( { html, hasChange: false } )
}
showPreviews: true
},
sanitizeHtml: html => ( { html, hasChange: false } )
} )
.then( editor => {
window.memoryTestEditor = editor;
Expand Down

0 comments on commit 897e424

Please sign in to comment.