diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chromium/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc b/chromium/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc index e44913c6e48..c791e8ed58e 100644 --- a/chromium/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc +++ b/chromium/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc @@ -359,11 +359,13 @@ ClipboardCommands::GetFragmentFromClipboard(LocalFrame& frame) { KURL url; const String markup = SystemClipboard::GetInstance().ReadHTML( url, fragment_start, fragment_end); - if (!markup.IsEmpty()) { + const String sanitized_markup = + SanitizeMarkupWithContext(markup, fragment_start, fragment_end); + if (!sanitized_markup.IsEmpty()) { DCHECK(frame.GetDocument()); - fragment = CreateFragmentFromMarkupWithContext( - *frame.GetDocument(), markup, fragment_start, fragment_end, url, - kDisallowScriptingAndPluginContent); + fragment = + CreateFragmentFromMarkup(*frame.GetDocument(), sanitized_markup, url, + kDisallowScriptingAndPluginContent); } } if (fragment) |