diff --git a/packages/block-editor/src/components/rich-text/use-paste-handler.js b/packages/block-editor/src/components/rich-text/use-paste-handler.js index 47800411a0d25..6e5383aabc167 100644 --- a/packages/block-editor/src/components/rich-text/use-paste-handler.js +++ b/packages/block-editor/src/components/rich-text/use-paste-handler.js @@ -265,6 +265,9 @@ function removeWindowsFragments( html ) { const startIdx = html.indexOf( startStr ); if ( startIdx > -1 ) { html = html.substring( startIdx + startStr.length ); + } else { + // No point looking for EndFragment + return html; } const endStr = '';