| Index: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| index 23111d3148139f0f1b2821922fe13c32ead2e78b..2e6cbfa271035e812a5830f1702a98365fe032e6 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| @@ -1313,7 +1313,7 @@ void ReplaceSelectionCommand::doApply(EditingState* editingState)
|
| if (editingState->isAborted())
|
| return;
|
|
|
| - if (m_sanitizeFragment) {
|
| + if (m_sanitizeFragment && insertedNodes.firstNodeInserted()) {
|
| applyCommandToComposite(SimplifyMarkupCommand::create(document(), insertedNodes.firstNodeInserted(), insertedNodes.pastLastLeaf()), editingState);
|
| if (editingState->isAborted())
|
| return;
|
|
|